AgentFrontCentralizeGoodsRefundLog.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. namespace app\models;
  3. use yii\behaviors\TimestampBehavior;
  4. use yii\db\ActiveRecord;
  5. /**
  6. * This is the model class for table "{{%agent_front_centralize_goods_ext}}".
  7. *
  8. * @property integer $id
  9. * @property string $centralize_goods_id
  10. * @property integer $refund_type
  11. * @property integer $md_id
  12. * @property integer $store_id
  13. * @property integer $refund_id
  14. * @property float $longitude
  15. * @property float $latitude
  16. * @property string $name
  17. * @property string $mobile
  18. * @property integer $province_id
  19. * @property integer $city_id
  20. * @property integer $district_id
  21. * @property string $address
  22. * @property string $goods_num_info
  23. * @property integer $status
  24. * @property integer $goods_num
  25. * @property integer $driver_id
  26. * @property integer $is_confirm_goods
  27. * @property string $main_goods_pic
  28. * @property string $other_goods_pic
  29. * @property string $back_md_pic
  30. * @property integer $confirm_time
  31. * @property integer $created_at
  32. * @property integer $updated_at
  33. */
  34. class AgentFrontCentralizeGoodsRefundLog extends \yii\db\ActiveRecord
  35. {
  36. //发货方式:0快递 1上门取货 2退回门店
  37. /**
  38. * 0快递
  39. */
  40. const REFUND_TYPE_EXPRESS = 0;
  41. /**
  42. * 1上门取货
  43. */
  44. const REFUND_TYPE_VISIT = 1;
  45. /**
  46. * 2退回门店
  47. */
  48. const REFUND_TYPE_BACK_MD = 2;
  49. /**
  50. * 状态:0未取货
  51. */
  52. const STATUS_NOT_TAKE = 0;
  53. /**
  54. * 状态:1已取货
  55. */
  56. const STATUS_TAKE_SUCCESS = 1;
  57. /**
  58. * 状态:2取货失败
  59. */
  60. const STATUS_TAKE_ERROR = 2;
  61. /**
  62. * @inheritdoc
  63. */
  64. public static function tableName()
  65. {
  66. return '{{%agent_front_centralize_goods_refund_log}}';
  67. }
  68. public function behaviors()
  69. {
  70. return [
  71. [
  72. 'class' => TimestampBehavior::class,
  73. 'attributes' => [
  74. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  75. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  76. ]
  77. ]
  78. ];
  79. }
  80. /**
  81. * @inheritdoc
  82. */
  83. public function rules()
  84. {
  85. return [
  86. [['centralize_goods_id', 'main_goods_pic', 'other_goods_pic', 'back_md_pic', 'mobile', 'name', 'address', 'goods_num_info'], 'string'],
  87. [['id', 'refund_type', 'md_id', 'store_id', 'status', 'province_id', 'city_id', 'district_id', 'refund_id', 'is_confirm_goods', 'driver_id', 'goods_num'], 'integer'],
  88. [['longitude', 'latitude', 'updated_at', 'created_at', 'confirm_time'], 'number']
  89. ];
  90. }
  91. public function attributeLabels()
  92. {
  93. return [
  94. 'id' => '',
  95. 'centralize_goods_id' => '商品信息ID',
  96. 'refund_type' => '退货类型:1上门收货 2退回门店',
  97. 'md_id' => '',
  98. 'store_id' => '',
  99. 'longitude' => '经度',
  100. 'latitude' => '纬度',
  101. 'name' => '退款人名称',
  102. 'mobile' => '退款人手机号',
  103. 'province_id' => '',
  104. 'city_id' => '',
  105. 'district_id' => '',
  106. 'goods_num_info' => '应收商品数量信息',
  107. 'status' => '状态:0未取 1确认取货 2取货失败',
  108. 'main_goods_pic' => '高价值照片',
  109. 'other_goods_pic' => '其他取回商品照片',
  110. 'back_md_pic' => '送回门店照片',
  111. 'confirm_time' => '确认取货时间',
  112. 'created_at' => '',
  113. 'updated_at' => '',
  114. ];
  115. }
  116. }