// +---------------------------------------------------------------------- declare(strict_types=1); namespace addon\appmall\model; use ywxapp\model\BaseModel; /** * 开发者(中心站) * 表:appmall_developers * @mixin \think\Model */ class Developer extends BaseModel { protected function getOptions(): array { return [ 'strict' => true, 'name' => 'appmall_developers', 'autoWriteTimestamp' => 'int', 'createTime' => 'create_at', 'updateTime' => 'update_at', ]; } /** * 关联收益记录 * @return \think\model\relation\HasMany */ public function revenues() { return $this->hasMany(Revenue::class, 'developer_id', 'id'); } /** * 关联提现单 * @return \think\model\relation\HasMany */ public function withdrawals() { return $this->hasMany(Withdrawal::class, 'developer_id', 'id'); } }