<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%COMPANY_BANK}}".
 *
 * @property string $ID
 * @property string $USER_ID 会员ID
 * @property string $OPEN_NAME 开户名
 * @property string $OPEN_BANK 开户行
 * @property string $BANK_ADDRESS 银行地址
 * @property string $BANK_NO 银行账号
 * @property string $CREATE_ADMIN 创建管理员
 * @property string $UPDATE_ADMIN 修改管理员
 * @property string $REMARK 备注
 * @property int $BANK_PROVINCE 银行省份
 * @property int $BANK_CITY 银行城市
 * @property int $BANK_COUNTY 银行地区
 * @property int $CREATED_AT 创建时间
 * @property int $UPDATED_AT 修改时间
 */
class CompanyBank extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%COMPANY_BANK}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['USER_ID', 'OPEN_NAME', 'OPEN_BANK', 'BANK_ADDRESS', 'BANK_NO', 'BANK_PROVINCE', 'BANK_CITY', 'BANK_COUNTY', 'CREATED_AT'], 'required'],
            [['BANK_PROVINCE', 'BANK_CITY', 'BANK_COUNTY', 'CREATED_AT', 'UPDATED_AT'], 'integer'],
            [['ID', 'USER_ID', 'BANK_NO', 'CREATE_ADMIN', 'UPDATE_ADMIN'], 'string', 'max' => 32],
            [['OPEN_NAME', 'OPEN_BANK', 'BANK_ADDRESS'], 'string', 'max' => 255],
            [['REMARK'], 'string', 'max' => 4000],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => '会员ID',
            'OPEN_NAME' => '开户名',
            'OPEN_BANK' => '开户行',
            'BANK_ADDRESS' => '银行地址',
            'BANK_NO' => '银行账号',
            'BANK_PROVINCE' => '银行省份',
            'BANK_CITY' => '银行城市',
            'BANK_COUNTY' => '银行地区',
            'CREATE_ADMIN' => '创建管理员',
            'UPDATE_ADMIN' => '修改管理员',
            'REMARK' => '备注',
            'CREATED_AT' => '创建时间',
            'UPDATED_AT' => '修改时间',
        ];
    }
}
