SaasOrder.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace app\model\saas;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasOne;
  5. /**
  6. * @property integer $id (主键)
  7. * @property integer $uuid
  8. * @property integer $agent_id 代理id
  9. * @property integer $store_id 店铺id
  10. * @property string $order_id
  11. * @property integer $product_id 商品ID
  12. * @property string $product_name
  13. * @property string $username
  14. * @property string $code
  15. * @property string $mobile
  16. * @property string $region
  17. * @property string $address
  18. * @property integer $status
  19. * @property string $express_id 顺丰订单id
  20. * @property integer $is_send 1已发送
  21. * @property integer $is_auto 1自动呼叫快递
  22. * @property string $remark
  23. * @property mixed $create_at
  24. */
  25. class SaasOrder extends Model
  26. {
  27. /**
  28. * The connection name for the model.
  29. *
  30. * @var string|null
  31. */
  32. protected $connection = 'mysql';
  33. /**
  34. * The table associated with the model.
  35. *
  36. * @var string
  37. */
  38. protected string $table = "saas_order";
  39. /**
  40. * The primary key associated with the table.
  41. *
  42. * @var string
  43. */
  44. protected string $primaryKey = "id";
  45. /**
  46. * Indicates if the model should be timestamped.
  47. *
  48. * @var bool
  49. */
  50. public bool $timestamps = false;
  51. public function goods(): HasOne
  52. {
  53. return $this->hasOne("app\model\saas\SaasGoods",'out_id','product_id');
  54. }
  55. public function poi(): HasOne
  56. {
  57. return $this->hasOne("app\model\saas\SaasStoreShop",'poi_id','poi_id');
  58. }
  59. }