<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%EXCEL_CHANGE_BALANCE}}".
 *
 * @property string $ID
 * @property string $EXCEL_IMPORT_ID 导入记录表ID
 * @property string $USER_NAME 会员编号
 * @property string $REAL_NAME 会员姓名
 * @property string $TYPE 账户类型
 * @property string $AMOUNT 调整金额
 * @property string $DEAL_TYPE 交易类型
 * @property string $REMARK 备注
 * @property string $REMARK_IS_SHOW 备注显示
 * @property int $SORT 序号
 * @property int $STATUS 状态
 * @property string $ERROR_REMARK 错误记录
 * @property int $CREATED_AT 创建时间
 */
class ExcelChangeBalance extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%EXCEL_CHANGE_BALANCE}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['EXCEL_IMPORT_ID', 'USER_NAME', 'REAL_NAME', 'TYPE', 'DEAL_TYPE', 'REMARK_IS_SHOW'], 'required'],
            [['SORT', 'STATUS', 'CREATED_AT'], 'integer'],
            [['AMOUNT'], 'number'],
            [['ID', 'EXCEL_IMPORT_ID', 'REAL_NAME'], 'string', 'max' => 32],
            [['ERROR_REMARK'], 'string', 'max' => 1000],
            [['USER_NAME'], 'string', 'max' => 16],
            [['TYPE'], 'string', 'max' => 20],
            [['DEAL_TYPE'], 'string', 'max' => 128],
            [['REMARK'], 'string', 'max' => 2000],
            [['REMARK_IS_SHOW'], 'string', 'max' => 8],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'EXCEL_IMPORT_ID' => '导入记录表ID',
            'USER_NAME' => '会员编号',
            'REAL_NAME' => '会员姓名',
            'TYPE' => '账户类型',
            'AMOUNT' => '调整金额',
            'DEAL_TYPE' => '交易类型',
            'REMARK' => '备注',
            'REMARK_IS_SHOW' => '备注显示',
            'SORT' => '序号',
            'STATUS' => '状态',
            'ERROR_REMARK' => '错误记录',
            'CREATED_AT' => '创建时间',
        ];
    }
}
