| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property integer $agent_id 所属代理
- * @property integer $store_id
- * @property integer $factory_id
- * @property integer $day_order 日订单量
- * @property mixed $create_at
- */
- class SaasStoreFactory extends Model
- {
- /**
- * The connection name for the model.
- *
- * @var string|null
- */
- protected $connection = 'mysql';
-
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected string $table = "saas_store_factory";
-
- /**
- * The primary key associated with the table.
- *
- * @var string
- */
- protected string $primaryKey = "id";
-
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public bool $timestamps = false;
- public function factory(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasFactory","factory_id","factory_id");
- }
- public function store(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasStore","store_id","store_id");
- }
- public function agent(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasAgent","agent_id","agent_id");
- }
- }
|