<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%CALC_BONUS_STANDARD}}".
 *
 * @property string $ID
 * @property string $USER_ID
 * @property string $LAST_DEC_LV
 * @property string $LAST_EMP_LV
 * @property int $LAST_STATUS
 * @property string $FROM_USER_ID
 * @property string $LAST_FROM_DEC_LV
 * @property string $LAST_FROM_EMP_LV
 * @property int $LAST_FROM_STATUS
 * @property string $AMOUNT
 * @property int $PERIOD_NUM
 * @property int $CALC_YEAR
 * @property int $CALC_MONTH
 * @property string $P_CALC_MONTH
 * @property string $LOGS
 * @property int $CREATED_AT
 * @property string $ORI_BONUS
 * @property string $RECONSUME_POINTS
 * @property string $MANAGE_TAX
 */
class CalcBonusStandard extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%CALC_BONUS_STANDARD}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['ID', 'USER_ID', 'FROM_USER_ID', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'P_CALC_MONTH', 'CREATED_AT'], 'required'],
            [['LAST_STATUS', 'LAST_FROM_STATUS', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CREATED_AT'], 'integer'],
            [['AMOUNT', 'ORI_BONUS', 'RECONSUME_POINTS', 'MANAGE_TAX'], 'number'],
            [['P_CALC_MONTH'], 'safe'],
            [['ID', 'USER_ID', 'LAST_DEC_LV', 'LAST_EMP_LV', 'FROM_USER_ID', 'LAST_FROM_DEC_LV', 'LAST_FROM_EMP_LV'], 'string', 'max' => 32],
            [['LOGS'], 'string', 'max' => 2000],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => 'User  ID',
            'LAST_DEC_LV' => 'Last  Dec  Lv',
            'LAST_EMP_LV' => 'Last  Emp  Lv',
            'LAST_STATUS' => 'Last  Status',
            'FROM_USER_ID' => 'From  User  ID',
            'LAST_FROM_DEC_LV' => 'Last  From  Dec  Lv',
            'LAST_FROM_EMP_LV' => 'Last  From  Emp  Lv',
            'LAST_FROM_STATUS' => 'Last  From  Status',
            'AMOUNT' => 'Amount',
            'PERIOD_NUM' => 'Period  Num',
            'CALC_YEAR' => 'Calc  Year',
            'CALC_MONTH' => 'Calc  Month',
            'P_CALC_MONTH' => 'P  Calc  Month',
            'LOGS' => 'Logs',
            'CREATED_AT' => 'Created  At',
            'ORI_BONUS' => 'Ori  Bonus',
            'RECONSUME_POINTS' => 'Reconsume  Points',
            'MANAGE_TAX' => 'Manage  Tax',
        ];
    }
}
