MarketingStat.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace addons\TinyShop\common\models\marketing;
  3. use common\behaviors\MerchantBehavior;
  4. /**
  5. * This is the model class for table "{{%addon_tiny_shop_marketing_stat}}".
  6. *
  7. * @property int $id 主键
  8. * @property int|null $merchant_id 店铺ID
  9. * @property int|null $marketing_id 对应活动
  10. * @property string|null $marketing_type 活动类型
  11. * @property int|null $total_customer_num 总客户数量
  12. * @property int|null $new_customer_num 新客户数量
  13. * @property int|null $old_customer_num 老客户数量
  14. * @property int|null $pay_money 订单实付金额
  15. * @property int|null $order_count 订单数量
  16. * @property int|null $product_count 订单产品数量
  17. * @property float|null $discount_money 优惠总金额
  18. * @property int|null $status 状态
  19. * @property int|null $created_at 创建时间
  20. * @property int|null $updated_at 修改时间
  21. */
  22. class MarketingStat extends \common\models\base\BaseModel
  23. {
  24. use MerchantBehavior;
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%addon_tiny_shop_marketing_stat}}';
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function rules()
  36. {
  37. return [
  38. [['merchant_id', 'marketing_id', 'total_customer_num', 'new_customer_num', 'old_customer_num', 'pay_money', 'order_count', 'product_count', 'status', 'created_at', 'updated_at'], 'integer'],
  39. [['discount_money'], 'number'],
  40. [['marketing_type'], 'string', 'max' => 60],
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => '主键',
  50. 'merchant_id' => '店铺ID',
  51. 'marketing_id' => '对应活动',
  52. 'marketing_type' => '活动类型',
  53. 'total_customer_num' => '总客户数量',
  54. 'new_customer_num' => '新客户数量',
  55. 'old_customer_num' => '老客户数量',
  56. 'pay_money' => '订单实付金额',
  57. 'order_count' => '订单数量',
  58. 'product_count' => '订单产品数量',
  59. 'discount_money' => '优惠总金额',
  60. 'status' => '状态',
  61. 'created_at' => '创建时间',
  62. 'updated_at' => '修改时间',
  63. ];
  64. }
  65. }
粤ICP备19079148号