| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%share_level_log}}".
- *
- * @property integer $id
- * @property integer $level
- * @property integer $type
- * @property string $value
- * @property integer $store_id
- * @property integer $is_delete
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $user_id
- * @property integer $old_level
- */
- class ShareLevelLog extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%share_level_log}}';
- }
- /**
- * 删除状态
- */
- CONST SHARE_IS_DELETE = 1; //已删除
- CONST SHARE_NOT_DELETE = 0; //未删除
- /**
- * 升级条件
- */
- CONST TYPE_MEMBER = 0; //下级人数
- CONST TYPE_COMMISSION = 1; //累计佣金
- CONST TYPE_SEND_COMMISSION = 2; //已提现佣金
- CONST TYPE_AMOUNT = 3; //累计消费金额
- CONST TYPE_ADMIN = 4; //累计消费金额
- public static $valid_type_arr = [
- self::TYPE_MEMBER,
- self::TYPE_COMMISSION,
- self::TYPE_SEND_COMMISSION,
- self::TYPE_AMOUNT,
- self::TYPE_ADMIN
- ];
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'level', 'type', 'store_id', 'is_delete', 'user_id', 'old_level'], 'integer'],
- [['value'], 'number'],
- [['created_at', 'updated_at'], 'safe']
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- "id" => "ID",
- "level" => "等级",
- "type" => "升级条件类型",
- "value" => "升级条件值",
- "store_id" => "Store Id",
- "is_delete" => "is Delete",
- "created_at" => "创建时间",
- "updated_at" => "修改时间",
- "user_id" => "用户id",
- "old_level" => "旧等级",
- ];
- }
- }
|