GoodsShare.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. /**
  10. * This is the model class for table "{{%goods_share}}".
  11. *
  12. * @property integer $id
  13. * @property integer $store_id
  14. * @property integer $type
  15. * @property integer $goods_id
  16. * @property integer $individual_share
  17. * @property string $share_commission_first
  18. * @property string $share_commission_second
  19. * @property string $share_commission_third
  20. * @property integer $share_type
  21. * @property string $rebate
  22. * @property string $attr_setting_type
  23. * @property integer $relation_id
  24. */
  25. class GoodsShare extends \yii\db\ActiveRecord
  26. {
  27. public $is_level;
  28. /**
  29. * 分销商品类型:拼团
  30. */
  31. const SHARE_GOODS_TYPE_PT = 0;
  32. /**
  33. * 分销商品类型:预约
  34. */
  35. const SHARE_GOODS_TYPE_YY = 1;
  36. /**
  37. * 分销商品类型:秒杀商品设置
  38. */
  39. const SHARE_GOODS_TYPE_MS = 2;
  40. /**
  41. * 分销商品类型:拼团阶梯团
  42. */
  43. const SHARE_GOODS_TYPE_PT_STANDARD = 3;
  44. /**
  45. * @inheritdoc
  46. */
  47. public static function tableName()
  48. {
  49. return '{{%goods_share}}';
  50. }
  51. /**
  52. * @inheritdoc
  53. */
  54. public function rules()
  55. {
  56. return [
  57. [['store_id', 'type', 'goods_id', 'individual_share', 'share_type', 'relation_id','mch_id'], 'integer'],
  58. [['share_commission_first', 'share_commission_second', 'share_commission_third', 'rebate', 'attr_setting_type'], 'number'],
  59. ];
  60. }
  61. /**
  62. * @inheritdoc
  63. */
  64. public function attributeLabels()
  65. {
  66. return [
  67. 'id' => 'ID',
  68. 'store_id' => 'Store ID',
  69. 'mch_id' => 'Mch ID',
  70. 'type' => '商品类型 0--拼团',
  71. 'goods_id' => '商品id',
  72. 'individual_share' => '是否单独分销设置:0=否,1=是',
  73. 'share_commission_first' => '一级分销佣金比例',
  74. 'share_commission_second' => '二级分销佣金比例',
  75. 'share_commission_third' => '三级分销佣金比例',
  76. 'share_type' => '佣金配比 0--百分比 1--固定金额',
  77. 'rebate' => '自购返利',
  78. 'relation_id' => '判断秒杀活动ID',
  79. ];
  80. }
  81. }