| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- namespace addons\ScoreExpansion\common\models;
- use common\models\user\User;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_score_expansion_log".
- *
- * @property int $id
- * @property int $mall_id 商城id
- * @property int $user_id 用户id
- * @property string $point_type 积分类型
- * @property string $from_type 来原类型
- * @property float $point_num 积分数量
- * @property string $order_sn 订单编号
- * @property string $change_type 操作类型:add-增加,sub-减少
- * @property float $change_num 操作数量
- * @property float $after_num 变动后数量
- * @property string $source_table 来源表
- * @property int $source_table_id 操作来源业务id
- * @property int|null $status 状态,-1:失效,1:正常,2:冻结
- * @property string $desc 变动说明
- * @property int $created_at 创建时间
- * @property int $updated_at 修改时间
- */
- class ScoreExpansionLog extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_score_expansion_log';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'user_id', 'point_type', 'from_type', 'order_sn', 'change_type', 'source_table', 'source_table_id'], 'required'],
- [['mall_id', 'user_id', 'source_table_id', 'status', 'created_at', 'updated_at'], 'integer'],
- [['point_num', 'change_num', 'after_num'], 'number'],
- [['from_type', 'order_sn', 'source_table', 'desc'], 'string', 'max' => 255],
- [['change_type'], 'string', 'max' => 12],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'user_id' => 'User ID',
- 'point_type' => 'Point Type',
- 'from_type' => 'From Type',
- 'point_num' => 'Point Num',
- 'order_sn' => 'Order Sn',
- 'change_type' => 'Change Type',
- 'change_num' => 'Change Num',
- 'after_num' => 'After Num',
- 'source_table' => 'Source Table',
- 'source_table_id' => 'Source Table ID',
- 'status' => 'Status',
- 'desc' => 'Desc',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- /**
- * 关联用户信息
- * @DateTime: 2023/2/28 0018 9:56
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return \yii\db\ActiveQuery
- */
- public function getUser()
- {
- return $this->hasOne(User::class, ['id' => 'user_id']);
- }
- }
|