<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%EXCEL_IMPORT}}".
 *
 * @property string $ID
 * @property string $OPTION_NAME 业务名称
 * @property string $TABLE_NAME 对应的待导入数据表名
 * @property string $UPLOAD_ID 上传文件ID
 * @property int $AUDIT_STATUS 审核状态
 * @property string $IMPORT_ADMIN_ID 导入管理员ID
 * @property string $AUDIT_ADMIN_ID 审核管理员ID
 * @property int $CREATED_AT 创建时间
 * @property int $AUDITED_AT 审核时间
 */
class ExcelImport extends \common\components\ActiveRecord
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%EXCEL_IMPORT}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['OPTION_NAME', 'IMPORT_ADMIN_ID', 'CREATED_AT'], 'required'],
            [['AUDIT_STATUS', 'CREATED_AT', 'AUDITED_AT'], 'integer'],
            [['ID', 'OPTION_NAME', 'TABLE_NAME', 'UPLOAD_ID', 'IMPORT_ADMIN_ID', 'AUDIT_ADMIN_ID'], 'string', 'max' => 32],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'OPTION_NAME' => '业务名称',
            'TABLE_NAME' => '对应的待导入数据表名',
            'UPLOAD_ID' => '上传文件ID',
            'AUDIT_STATUS' => '审核状态',
            'IMPORT_ADMIN_ID' => '导入管理员ID',
            'AUDIT_ADMIN_ID' => '审核管理员ID',
            'CREATED_AT' => '创建时间',
            'AUDITED_AT' => '审核时间',
        ];
    }
}
