| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $poi_id
- * @property string $sn 序列号
- * @property string $device_key
- * @property string $name 打印机名称
- * @property string $device_state
- * @property string $online
- * @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 poi(): HasOne
- {
- return $this->hasOne(SaasStore::class,"poi_id","poi_id");
- }
- }
|