| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace common\models;
- /**
- * This is the model class for table "xhUserAsset".
- *
- * @property int $id
- * @property int $userId 用户id
- * @property int $merchantId 商家id
- * @property string $totalExpend 累计消费
- * @property string $totalIncome 累计收入
- * @property string $totalRecharge 累计充值
- * @property int $totalBuyNum 已经付款购买的数量
- * @property string $balance 余额
- * @property int $integral 可兑换型积分余额
- * @property int $point 升级型积分余额
- * @property int $discount 折扣
- * @property string $uniqueCode 用户唯一编码
- * @property string $uniqueQrCode 二维码地址
- * @property int $isMember 0普通用户 1会员
- * @property int $memberLevel 会员等级 0普通用户 1会员一级
- * @property string $createTime 创建时间
- * @property string $updateTime
- */
- class xhUserAsset extends xhBaseModel
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'xhUserAsset';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['userId', 'merchantId', 'totalBuyNum', 'integral', 'point', 'discount', 'isMember', 'memberLevel'], 'integer'],
- [['totalExpend', 'totalIncome', 'totalRecharge', 'balance'], 'number'],
- [['createTime'], 'required'],
- [['createTime', 'updateTime'], 'safe'],
- [['uniqueCode'], 'string', 'max' => 100],
- [['uniqueQrCode'], 'string', 'max' => 200],
- [['uniqueCode'], 'unique'],
- [['userId'], 'unique'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'userId' => 'User ID',
- 'merchantId' => 'Merchant ID',
- 'totalExpend' => 'Total Expend',
- 'totalIncome' => 'Total Income',
- 'totalRecharge' => 'Total Recharge',
- 'totalBuyNum' => 'Total Buy Num',
- 'balance' => 'Balance',
- 'integral' => 'Integral',
- 'point' => 'Point',
- 'discount' => 'Discount',
- 'uniqueCode' => 'Unique Code',
- 'uniqueQrCode' => 'Unique Qr Code',
- 'isMember' => 'Is Member',
- 'memberLevel' => 'Member Level',
- 'createTime' => 'Create Time',
- 'updateTime' => 'Update Time',
- ];
- }
- }
|