| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use app\model\system\SystemUser;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $openid
- * @property mixed $poi_id 店铺ID
- * @property string $poi_name 店铺名称
- * @property mixed $create_at
- */
- class SaasChatStore 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_chat_store";
-
- /**
- * 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 user(): HasOne
- {
- return $this->hasOne(SaasUserOpen::class,"openid","openid");
- }
- public function nick(): HasOne
- {
- return $this->hasOne(SystemUser::class,"id","service_id");
- }
- public function orders(): HasOne
- {
- return $this->hasOne(SaasOrder::class,"order_sn","order");
- }
- public function good(): HasOne
- {
- return $this->hasOne(SaasGoods::class,"product_id","goods");
- }
- }
|