| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use think\model\relation\HasMany;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $poi_id 门店ID
- * @property string $plan_name
- * @property string $merchant_phone
- * @property integer $status
- * @property mixed $create_at
- */
- class SaasLivePlan 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_live_plan";
-
- /**
- * 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 goods(): HasMany
- {
- return $this->hasMany(SaasLivePlanGoods::class,'plan_id','plan_id');
- }
- public function star(): HasMany
- {
- return $this->hasMany(SaasLivePlanStar::class,'plan_id','plan_id');
- }
- public function poi(): HasOne
- {
- return $this->hasOne(SaasStore::class,'poi_id','poi_id');
- }
- }
|