| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $order_sn
- * @property mixed $openid
- * @property mixed $product_id
- * @property mixed $sku_id
- * @property integer $number
- * @property string $img
- * @property integer $price
- * @property integer $line_price
- * @property string $sku_name
- * @property mixed $poi_id
- * @property mixed $mobile
- */
- class SaasOrder 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_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 product(): HasOne
- {
- return $this->hasOne(SaasGoods::class,"product_id","product_id");
- }
- public function poi(): HasOne
- {
- return $this->hasOne(SaasStore::class,"poi_id","poi_id");
- }
- }
|