| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?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 string $city_text
- * @property mixed $city_code
- * @property string $nickname
- * @property string $mobile
- * @property string $address
- * @property mixed $create_at
- */
- class SaasOrderAddress 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_address";
-
- /**
- * 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 goods(): HasOne
- {
- return $this->hasOne(SaasGoodsOff::class,"id","goods");
- }
- public function orders(): HasOne
- {
- return $this->hasOne(SaasOrder::class,"out_order_no","order_sn");
- }
- }
|