<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%CALC_BONUS_ST}}".
 *
 * @property string $ID
 * @property string $USER_ID 会员ID
 * @property string $FROM_USER_ID 来源会员ID
 * @property string $AMOUNT 金额
 * @property int $PERIOD_NUM 结算期数
 * @property int $CALC_MONTH 所在结算月
 * @property int $CREATED_AT 创建时间
 * @property $ORI_BONUS 原奖金
 * @property $RECONSUME_POINTS 重复消费积分
 * @property $MANAGE_TAX 管理费
 */
class CalcBonusST extends \common\components\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%CALC_BONUS_ST}}';
    }

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

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => '会员ID',
            'FROM_USER_ID' => '来源会员ID',
            'AMOUNT' => '金额',
            'PERIOD_NUM' => '结算期数',
            'CALC_MONTH' => '所在结算月',
            'CREATED_AT' => '创建时间',
            'ORI_BONUS' => '原奖金',
            'RECONSUME_POINTS' => '重复消费积分',
            'MANAGE_TAX' => '管理费',
        ];
    }
}
