| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- use Yii;
- /**
- * This is the model class for table "{{%recharge}}".
- *
- * @property int $id
- * @property int|null $store_id
- * @property float $pay_price 支付金额
- * @property float $send_price 赠送金额
- * @property string $name 充值名称
- * @property int|null $is_delete
- * @property int|null $created_at
- * @property int|null $updated_at
- * @property int|null $sort 权重
- * @property int|null $send_integral
- */
- class Recharge extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%recharge}}';
- }
- const IS_DELETE_YES = 1;//已删除
- const IS_DELETE_NO = 0;//未删除
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['store_id', 'is_delete', 'created_at', 'updated_at', 'sort', 'send_integral','level_up'], 'integer'],
- [['pay_price', 'send_price','level_one_bonus','level_two_bonus',], 'number'],
- [['name'], 'required'],
- [['name','assign_member'], 'string', 'max' => 255],
- [['referral_commission'], 'string'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'pay_price' => '支付金额',
- 'send_price' => '赠送金额',
- 'name' => '充值名称',
- 'is_delete' => 'Is Delete',
- 'created_at' => 'Add Time',
- 'updated_at' => 'Update Time',
- 'sort' => '权重',
- 'send_integral' => '赠送积分',
- ];
- }
- }
|