<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%TEST}}".
 *
 * @property string $ID
 * @property string $USER_ID 会员ID
 * @property string $PV_PERSON_LS 个人零售隐藏分区
 * @property string $PV_PCS_ZC 个人消费注册单业绩
 * @property int $PERIOD_NUM 期数
 * @property int $CALC_MONTH 结算月
 * @property string $P_DAY 分区表划分
 * @property int $CREATED_AT 创建时间
 */
class Test extends \common\components\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%TEST}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['USER_ID', 'PERIOD_NUM', 'CALC_MONTH', 'CREATED_AT'], 'required'],
            [['PV_PERSON_LS', 'PV_PCS_ZC'], 'number'],
            [['PERIOD_NUM', 'CALC_MONTH', 'CREATED_AT'], 'integer'],
            [['ID', 'USER_ID'], 'string', 'max' => 32],
            [['ID'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => '会员ID',
            'PV_PERSON_LS' => '个人零售隐藏分区',
            'PV_PCS_ZC' => '个人消费注册单业绩',
            'PERIOD_NUM' => '期数',
            'CALC_MONTH' => '结算月',
            'P_DAY' => '分区表划分',
            'CREATED_AT' => '创建时间',
        ];
    }
}
