IntegralRecharge.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. use Yii;
  11. /**
  12. * This is the model class for table "{{%integral_recharge}}".
  13. *
  14. * @property int $id
  15. * @property int|null $store_id
  16. * @property float $pay_price 支付金额
  17. * @property float $original_price 支付金额
  18. * @property string $name 充值名称
  19. * @property int|null $is_delete
  20. * @property int|null $created_at
  21. * @property int|null $send_integral
  22. * @property int|null $first_commission
  23. * @property int|null $second_commission
  24. * @property int|null $third_commission
  25. * @property int|null $state
  26. */
  27. class IntegralRecharge extends \yii\db\ActiveRecord
  28. {
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public static function tableName()
  33. {
  34. return '{{%integral_recharge}}';
  35. }
  36. public function behaviors()
  37. {
  38. return [
  39. [
  40. 'class' => TimestampBehavior::class,
  41. 'attributes' => [
  42. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  43. ]
  44. ]
  45. ];
  46. }
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function rules()
  51. {
  52. return [
  53. [['store_id', 'is_delete', 'created_at', 'send_integral', 'first_commission', 'second_commission', 'third_commission', 'state', 'original_price'], 'integer'],
  54. [['pay_price'], 'number'],
  55. [['name'], 'required'],
  56. [['name'], 'string', 'max' => 255],
  57. ];
  58. }
  59. /**
  60. * {@inheritdoc}
  61. */
  62. public function attributeLabels()
  63. {
  64. return [
  65. 'id' => 'ID',
  66. 'store_id' => 'Store ID',
  67. 'pay_price' => '支付金额',
  68. 'name' => '充值名称',
  69. 'is_delete' => 'Is Delete',
  70. 'created_at' => 'Add Time',
  71. 'send_integral' => '赠送积分',
  72. 'first_commission' => '一级佣金',
  73. 'second_commission' => '二级佣金',
  74. 'third_commission' => '三级佣金',
  75. 'state' => '是否启用',
  76. 'original_price' => '原价',
  77. ];
  78. }
  79. }