RechargeConfig.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace addons\TinyShop\common\models\marketing;
  3. use common\behaviors\MerchantBehavior;
  4. /**
  5. * This is the model class for table "{{%member_recharge_config}}".
  6. *
  7. * @property int $id
  8. * @property int|null $merchant_id 商户
  9. * @property float|null $price 充值金额
  10. * @property float|null $give_price 赠送金额
  11. * @property int|null $give_point 赠送金额
  12. * @property int|null $give_growth 赠送成长值
  13. * @property int|null $sort 排序
  14. * @property int|null $status 状态
  15. * @property int $created_at 创建时间
  16. * @property int $updated_at 更新时间
  17. */
  18. class RechargeConfig extends \common\models\base\BaseModel
  19. {
  20. use MerchantBehavior;
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%addon_tiny_shop_marketing_recharge_config}}';
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function rules()
  32. {
  33. return [
  34. [['price', 'give_price', 'give_point', 'give_growth'], 'required'],
  35. [['price', 'give_price', 'give_point', 'give_growth'], 'number', 'min' => 0],
  36. [['merchant_id', 'sort', 'status', 'created_at', 'updated_at'], 'integer'],
  37. ];
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'id' => 'ID',
  46. 'merchant_id' => '商户',
  47. 'price' => '充值金额',
  48. 'give_price' => '赠送金额',
  49. 'give_point' => '赠送积分',
  50. 'give_growth' => '赠送成长值',
  51. 'sort' => '排序',
  52. 'status' => '状态',
  53. 'created_at' => '创建时间',
  54. 'updated_at' => '更新时间',
  55. ];
  56. }
  57. }
粤ICP备19079148号