| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%level}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $level
- * @property string $name
- * @property string $status
- * @property string $money
- * @property string $discount
- * @property integer $is_delete
- * @property integer $created_at
- * @property string $image
- * @property string $price
- * @property string $detail
- * @property string $buy_prompt
- * @property string $synopsis
- * @property float $firstProfit
- * @property float $secondProfit
- * @property float $thirdProfit
- * @property integer $is_student
- * @property integer $expires_type
- * @property integer $expires_in
- */
- class Level extends \yii\db\ActiveRecord
- {
- /**
- * 会员禁用状态:0: 禁用, 1:启用
- */
- CONST STATUS_FALSE = 0;
- CONST STATUS_TRUE = 1;
- CONST STUDENT_FALSE = 0;
- CONST STUDENT_TRUE = 1;
- public $valid_level_status = [
- self::STATUS_FALSE,
- self::STATUS_TRUE
- ];
- /**
- * 是否删除
- */
- CONST IS_DELETE = 1;
- CONST NOT_DELETE = 0;
- public $valid_delete_status = [
- self::IS_DELETE,
- self::NOT_DELETE
- ];
- const EXPIRES_TYPE_DAY = 0;
- const EXPIRES_TYPE_YEAR = 1;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%level}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'level', 'status', 'is_delete', 'created_at', 'is_student', 'expires_type'], 'integer'],
- [['money', 'discount', 'price', 'firstProfit', 'secondProfit', 'thirdProfit', 'expires_in'], 'number'],
- [['image', 'synopsis'], 'string'],
- [['name', 'detail', 'buy_prompt'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'level' => 'Level',
- 'name' => '等级名称',
- 'money' => '会员完成订单金额满足则升级',
- 'discount' => '折扣',
- 'status' => '状态 0--禁用 1--启用',
- 'is_delete' => 'Is Delete',
- 'created_at' => '添加时间',
- 'image' => '升级 图片',
- 'price' => '升级 所需价格',
- 'detail' => '会员介绍',
- 'buy_prompt' => '会员购买提示',
- 'synopsis' => '内容',
- 'firstProfit' => '一级分销佣金',
- 'secondProfit' => '二级分销佣金',
- 'thirdProfit' => '三级分销佣金',
- 'is_student' => '是否学生会员:0=否;1=是;',
- 'expires_type' => '到期类型0天 1年',
- 'expires_in' => '到期时间'
- ];
- }
- }
|