| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\model\cutter;
- use app\extra\basic\Model;
- use app\model\user\User;
- use think\model\relation\HasOne;
- /**
- * 任务
- */
- class CutterOrder 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 = "cutter_order";
-
- /**
- * 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 Task(): HasOne
- {
- return $this->hasOne(CutterTask::class,"id","task_id");
- }
- public function user(): HasOne
- {
- return $this->hasOne(User::class,"uid","uid");
- }
- }
|