| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace app\model\hx;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $product_id
- * @property string $product_name
- * @property integer $biz_line 业务线
- * @property integer $product_type
- * @property mixed $pois poi
- * @property integer $actual_amount
- * @property string $cover
- * @property integer $sold_end_time
- * @property integer $sold_start_time
- * @property mixed $create_at
- */
- class HxGoods 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 = "hx_goods";
-
- /**
- * 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(HxAgent::class,"agent_id","agent_id");
- }
- }
|