| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use app\modules\admin\models\wechat_mp\CardForm;
- use app\utils\IotCloudHelper;
- /**
- * This is the model class for table "{{%account_log}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $order_type
- * @property integer $order_id
- * @property integer $user_id
- * @property integer $amount
- * @property string $desc
- * @property integer $before
- * @property integer $after
- * @property string $operator
- * @property integer $operator_id
- * @property integer $log_type
- * @property integer $type
- * @property integer $operator_type
- * @property string $pic_url
- * @property string $explain
- * @property integer $created_at
- * @property integer $from
- * @property integer $from_user_id
- * @property integer $profit
- * @property integer $saas_id
- * @property integer $queue_id
- * @property integer $from_queue_id
- */
- class QueueAccountLog extends \yii\db\ActiveRecord
- {
- /**
- * 收入类型
- */
- CONST LOG_TYPE_INCOME = 1;
- /**
- * 支出类型
- */
- CONST LOG_TYPE_EXPEND = 2;
- /**
- * 余额
- */
- CONST TYPE_BALANCE = 2;
- /**
- * 积分
- */
- CONST TYPE_INTEGRAL = 1;
- /**
- * 微信
- */
- CONST TYPE_WECHAT = 3;
- /**
- * 支付宝
- */
- CONST TYPE_ALIPAY = 4;
- public static $valid_type = [
- self::TYPE_BALANCE,
- self::TYPE_INTEGRAL,
- self::TYPE_WECHAT,
- self::TYPE_ALIPAY
- ];
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%queue_account_log}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['user_id', 'type', 'amount', 'desc', 'before', 'after',
- 'log_type', 'type'], 'required'],
- [['user_id', 'type', 'created_at', 'order_id', 'log_type', 'saas_id', 'from_queue_id', 'queue_id'
- ], 'integer'],
- [['amount', 'before', 'after'], 'number'],
- [['desc'], 'string'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'user_id' => 'User ID',
- 'log_type' => '类型:1=收入,2=支出',
- 'type' => '类型:2=余额,1=积分',
- 'amount' => '变动数',
- 'desc' => '变动说明',
- 'before' => '变动前',
- 'after' => '变动后',
- 'pic_url' => '图片',
- 'created_at' => '添加时间',
- 'order_id' => '订单ID',
- 'from' => '是否为转增',
- 'saas_id' => '联盟用户',
- 'from_queue_id' => '来源队列',
- 'queue_id' => '队列',
- ];
- }
- }
|