<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%PERF_COMPANY}}".
 *
 * @property string $ID ID
 * @property string $PV 月总业绩
 * @property int $CALC_YEAR 结算年
 * @property int $CALC_MONTH 结算月
 * @property int $CREATED_AT 创建时间
 */
class PerfCompany extends \common\components\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%PERF_COMPANY}}';
    }

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

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'PV' => '月总业绩',
            'CALC_YEAR' => '结算年',
            'CALC_MONTH' => '结算月',
            'CREATED_AT' => '创建时间',
        ];
    }
}
