cxgj/models/UserCoupon.php
2023-11-27 09:45:13 +08:00

59 lines
1.5 KiB
PHP

<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "{{%user_coupon}}".
*
* @property int $id
* @property int $user_id
* @property int $coupon_id 卡券id
* @property int|null $status 状态0=可使用1=已使用
* @property int|null $created_at 领取时间
* @property int|null $updated_at 使用时间
* @property int|null $is_delete
* @property int|null $deleted_at
* @property int|null $is_admin_send 是否平台发放
*/
class UserCoupon extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%user_coupon}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'coupon_id'], 'required'],
[['user_id', 'coupon_id', 'status', 'created_at', 'updated_at', 'is_delete', 'deleted_at','is_admin_send'], 'integer'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'user_id' => 'User ID',
'coupon_id' => '卡券id',
'status' => '状态0=可使用1=已使用',
'created_at' => '领取时间',
'updated_at' => '使用时间',
'is_delete' => 'Is Delete',
'deleted_at' => 'Deleted At',
'is_admin_send' => '是否平台发放',
];
}
}