<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%USER_PERIOD_POINTS}}".
 *
 * @property string $ID
 * @property string $USER_ID 会员ID
 * @property int $PERIOD_NUM 报单期数
 * @property string $RECONSUME_POINTS 复消积分
 * @property string $REMAINDER_POINTS 剩余积分
 * @property int EXPIRED 是否过期
 * @property int EXPIRED_PERIOD 过期期数
 * @property int EXPIRED_AT 过期时间
 * @property int $CREATED_AT 创建时间
 */
class UserPeriodPoints extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%USER_PERIOD_POINTS}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['USER_ID', 'PERIOD_NUM', 'CREATED_AT'], 'required'],
            [['PERIOD_NUM', 'CREATED_AT', 'EXPIRED', 'EXPIRED_PERIOD', 'EXPIRED_AT'], 'integer'],
            [['RECONSUME_POINTS', 'REMAINDER_POINTS'], 'number'],
            [['ID', 'USER_ID'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => '会员ID',
            'RECONSUME_POINTS' => '复消积分',
            'REMAINDER_POINTS' => '剩余积分',
            'EXPIRED' => '是否过期',
            'EXPIRED_PERIOD' => '过期期数',
            'EXPIRED_AT' => '过期时间',
            'CREATED_AT' => '创建时间',
        ];
    }
}
