ReservationServiceGoodsSetting.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace addons\ReservationService\common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "qimall_addons_reservation_service_goods_setting".
  6. *
  7. * @property int $id ID
  8. * @property int $created_at 创建时间
  9. * @property int $updated_at 更新时间
  10. * @property int $mall_id 商城ID
  11. * @property int $status 状态0禁用,-1删除,1正常
  12. * @property int $item_id 绑定的商品ID
  13. * @property string $item_type 类型、goods/order
  14. * @property string $commission_type commission/score
  15. * @property int $is_enable 是否启用
  16. * @property int $is_percent 是否为百分比
  17. * @property float $commission 奖励金额
  18. * @property int $is_enable_distribution 是否启用分销奖励
  19. * @property string|null $distribution_config 奖励配置
  20. */
  21. class ReservationServiceGoodsSetting extends \common\models\base\BaseActiveRecord
  22. {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public static function tableName()
  27. {
  28. return 'qimall_addons_reservation_service_goods_setting';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['created_at', 'updated_at', 'mall_id', 'status', 'item_id', 'is_enable', 'is_percent', 'is_enable_distribution'], 'integer'],
  37. [['mall_id'], 'required'],
  38. [['commission'], 'number'],
  39. [['distribution_config'], 'safe'],
  40. [['item_type', 'commission_type'], 'string', 'max' => 50],
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'created_at' => 'Created At',
  51. 'updated_at' => 'Updated At',
  52. 'mall_id' => 'Mall ID',
  53. 'status' => 'Status',
  54. 'item_id' => 'Item ID',
  55. 'item_type' => 'Item Type',
  56. 'commission_type' => 'Commission Type',
  57. 'is_enable' => 'Is Enable',
  58. 'is_percent' => 'Is Percent',
  59. 'commission' => 'Commission',
  60. 'is_enable_distribution' => 'Is Enable Distribution',
  61. 'distribution_config' => 'Distribution Config',
  62. ];
  63. }
  64. }