xhOrder.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhOrder".
  5. *
  6. * @property string $id 订单号
  7. * @property string $orderName 订单名称 (也指 商品名称)
  8. * @property int $goodsNum 商品数量
  9. * @property int $payWay 支付方式 0微信 1支付宝 2余额,具体请查看配置文件configDict payWay
  10. * @property int $payStyle 0第三方支付 1非第三方支付
  11. * @property string $payCode 支付返回号
  12. * @property int $modPriceStatus 是否可以修改价格0可以 1不可以
  13. * @property int $sourceType 订单来源,0商城订单 1付款订单
  14. * @property string $prePrice 应付款,原价,未修改价格,打折前
  15. * @property string $actPrice 实际付款,实价,修改后价格,打折后
  16. * @property int $userId 用户id
  17. * @property string $alipayId 支付宝用户id
  18. * @property int $merchantId 商户id
  19. * @property string $receiveProvince 收货地址 省
  20. * @property string $receiveCity 收货地址 市
  21. * @property string $receiveDist 收货地址 区县市
  22. * @property string $receiveAddress 收货的详细街道地址
  23. * @property string $receiveFullAddress 完整收货地址
  24. * @property string $receiveFloor 楼号门牌号
  25. * @property string $receiveLong 收货的经度
  26. * @property string $receiveLat 收货的纬度
  27. * @property int $useType 赠送类型,0送给别人,1寄给自己
  28. * @property int $anonymity 0不匿名派送 1匿名派送
  29. * @property string $sendCost 运费
  30. * @property string $sendNum 配送编号,方便寻找订单对应的花束
  31. * @property int $sendDistance 送货距离,多少米
  32. * @property string $reachTime 送达时间
  33. * @property int $reachPeriod 0上午1下午2晚上,具体看配置文件
  34. * @property string $bookMobile 订花人电话
  35. * @property string $bookName 订花人名
  36. * @property string $receiveMobile 收货人电话
  37. * @property string $receiveUserName 收货人姓名
  38. * @property string $needSend 是否配送,1:配送(默认)、0:不配送
  39. * @property int $needCard 0不需要,1需要
  40. * @property int $needCard 0不需要,1需要
  41. * @property string $blessing 祝福语
  42. * @property string $uniCode 唯一号码,预留字段
  43. * @property int $couponId 代金劵id
  44. * @property int $luckyNum 抽奖号码
  45. * @property int $payStatus 支付状态:-1客户关闭、0待付款、1已付款
  46. * @property int $sendStatus 发货状态:0未发货、1已发货、2已送达
  47. * @property int $printStatus 0未打印 1打印过了
  48. * @property string $remark 备注
  49. * @property int $status 订单生存状态 0正常 1删除
  50. * @property int $deadline 订单有效期
  51. * @property int $addTime 添加时间,时间戳格式
  52. * @property string $createTime 创建时间
  53. * @property string $updateTime
  54. */
  55. class xhOrder extends xhBaseModel
  56. {
  57. /**
  58. * @inheritdoc
  59. */
  60. public static function tableName()
  61. {
  62. return 'xhOrder';
  63. }
  64. /**
  65. * @inheritdoc
  66. */
  67. public function rules()
  68. {
  69. return [
  70. [['id', 'createTime'], 'required'],
  71. [['goodsNum', 'payWay', 'payStyle', 'modPriceStatus', 'sourceType', 'shopId','userId', 'merchantId', 'useType', 'anonymity', 'sendDistance', 'reachPeriod', 'needCard', 'couponId', 'luckyNum', 'payStatus', 'sendStatus', 'printStatus', 'status', 'deadline', 'addTime', 'needSend'], 'integer'],
  72. [['prePrice', 'actPrice', 'sendCost'], 'number'],
  73. [['reachTime', 'createTime', 'updateTime'], 'safe'],
  74. [['id', 'orderName', 'receiveFullAddress', 'receiveUserName'], 'string', 'max' => 100],
  75. [['payCode', 'remark'], 'string', 'max' => 1000],
  76. [['alipayId', 'receiveFloor'], 'string', 'max' => 50],
  77. [['receiveProvince', 'receiveCity', 'receiveDist', 'receiveLong', 'receiveLat', 'sendNum', 'bookMobile', 'bookName', 'uniCode'], 'string', 'max' => 20],
  78. [['receiveAddress', 'blessing'], 'string', 'max' => 500],
  79. [['receiveMobile'], 'string', 'max' => 15],
  80. [['id'], 'unique'],
  81. ];
  82. }
  83. /**
  84. * @inheritdoc
  85. */
  86. public function attributeLabels()
  87. {
  88. return [
  89. 'id' => 'ID',
  90. 'orderName' => 'Order Name',
  91. 'goodsNum' => 'Goods Num',
  92. 'payWay' => 'Pay Way',
  93. 'payStyle' => 'Pay Style',
  94. 'payCode' => 'Pay Code',
  95. 'modPriceStatus' => 'Mod Price Status',
  96. 'sourceType' => 'Source Type',
  97. 'prePrice' => 'Pre Price',
  98. 'actPrice' => 'Act Price',
  99. 'userId' => 'User ID',
  100. 'alipayId' => 'Alipay ID',
  101. 'merchantId' => 'Merchant ID',
  102. 'receiveProvince' => 'Receive Province',
  103. 'receiveCity' => 'Receive City',
  104. 'receiveDist' => 'Receive Dist',
  105. 'receiveAddress' => 'Receive Address',
  106. 'receiveFullAddress' => 'Receive Full Address',
  107. 'receiveFloor' => 'Receive Floor',
  108. 'receiveLong' => 'Receive Long',
  109. 'receiveLat' => 'Receive Lat',
  110. 'useType' => 'Use Type',
  111. 'anonymity' => 'Anonymity',
  112. 'shopId' => 'shopId',
  113. 'sendCost' => 'Send Cost',
  114. 'sendNum' => 'Send Num',
  115. 'sendDistance' => 'Send Distance',
  116. 'reachTime' => 'Reach Time',
  117. 'reachPeriod' => 'Reach Period',
  118. 'bookMobile' => 'Book Mobile',
  119. 'bookName' => 'Book Name',
  120. 'receiveMobile' => 'Receive Mobile',
  121. 'receiveUserName' => 'Receive User Name',
  122. 'needCard' => 'Need Card',
  123. 'needSend' => 'Need Send',
  124. 'blessing' => 'Blessing',
  125. 'uniCode' => 'Uni Code',
  126. 'couponId' => 'Coupon ID',
  127. 'luckyNum' => 'Lucky Num',
  128. 'payStatus' => 'Pay Status',
  129. 'sendStatus' => 'Send Status',
  130. 'printStatus' => 'Print Status',
  131. 'remark' => 'Remark',
  132. 'status' => 'Status',
  133. 'deadline' => 'Deadline',
  134. 'addTime' => 'Add Time',
  135. 'createTime' => 'Create Time',
  136. 'updateTime' => 'Update Time',
  137. ];
  138. }
  139. }