| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- namespace addons\Store\common\models;
- use common\models\base\BaseActiveRecord;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_store_coupon_reward_log".
- *
- * @property int $id
- * @property int $mall_id
- * @property int $user_id
- * @property int $store_id 门店id
- * @property int $coupon_id 优惠券id
- * @property float $reward_number 奖励数额
- * @property int $reward_scenarios 奖励场景,1:转赠奖励,2:使用奖励
- * @property int $reward_type 奖励类型,1:余额,2:红包,3:积分,4:系统虚拟货币
- * @property string $reward_type_code 奖励类型代码,balance:余额,red_packet:红包,score:积分,如果是虚拟货币,则记录其 code
- * @property string $source_table 数据来源表
- * @property int $source_id 数据来源id
- * @property int $created_at 创建时间
- * @property int $updated_at
- */
- class StoreCouponRewardLog extends BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%addons_store_coupon_reward_log}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'user_id', 'store_id', 'coupon_id'], 'required'],
- [['mall_id', 'user_id', 'store_id', 'coupon_id', 'reward_scenarios', 'reward_type', 'source_id', 'created_at', 'updated_at'], 'integer'],
- [['reward_number'], 'number'],
- [['reward_type_code'], 'string', 'max' => 20],
- [['source_table'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'user_id' => 'User ID',
- 'store_id' => 'Store ID',
- 'coupon_id' => 'Coupon ID',
- 'reward_number' => 'Reward Number',
- 'reward_scenarios' => 'Reward Scenarios',
- 'reward_type' => 'Reward Type',
- 'reward_type_code' => 'Reward Type Code',
- 'source_table' => 'Source Table',
- 'source_id' => 'Source ID',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- }
|