| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property string $sn 序列号
- * @property integer $agent_id
- * @property integer $store_id
- * @property string $device_key
- * @property string $name 打印机名称
- * @property mixed $create_at
- */
- class SaasPrint 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_print";
-
- /**
- * 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 agent(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasAgent","agent_id","agent_id");
- }
- public function store(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasStore","store_id","store_id");
- }
- }
|