feat: add simplified Feishu configuration and workflow docs
- Update .gitignore to exclude large SQL files except migrations - Add GIT_WORKFLOW.md documenting branch strategy - Update Company model with Feishu app retrieval methods - Update User model with Feishu-related scopes - Update FeishuService to support multi-app configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -73,21 +73,24 @@ class Company extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取飞书应用配置
|
* 获取默认飞书应用配置
|
||||||
*/
|
*/
|
||||||
public function feishuApps()
|
public function getDefaultFeishuApp(): ?array
|
||||||
{
|
{
|
||||||
return $this->hasMany(CompanyFeishuApp::class, 'company_id');
|
$sql = "SELECT * FROM company_feishu_apps WHERE company_id = ? AND system_id = 1 AND status = 1 ORDER BY sort ASC LIMIT 1";
|
||||||
|
$stmt = \App\Util\Db::connection()->getPdo()->prepare($sql);
|
||||||
|
$stmt->execute([$this->id]);
|
||||||
|
return $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取默认飞书应用(X-Server)
|
* 获取所有飞书应用配置
|
||||||
*/
|
*/
|
||||||
public function getDefaultFeishuApp()
|
public function getFeishuApps(): array
|
||||||
{
|
{
|
||||||
return $this->hasOne(CompanyFeishuApp::class, 'company_id')
|
$sql = "SELECT * FROM company_feishu_apps WHERE company_id = ? AND status = 1 ORDER BY sort";
|
||||||
->where('system_id', 1)
|
$stmt = \App\Util\Db::connection()->getPdo()->prepare($sql);
|
||||||
->where('status', 1)
|
$stmt->execute([$this->id]);
|
||||||
->orderBy('sort');
|
return $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user