| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?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");
- }
- public function user(): HasOne
- {
- return $this->hasOne(SaasUserOpen::class,"openid","openid");
- }
- }
|