<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%RECEIVE_ADDRESS}}".
 *
 * @property string $ID
 * @property string $USER_ID 用户ID
 * @property string $USER_NAME 用户编号
 * @property string $CONSIGNEE 收货人
 * @property string $MOBILE 收货人手机
 * @property int $PROVINCE 省份名称
 * @property int $CITY 城市名称
 * @property int $COUNTY 县区名称
 * @property string $LGA_NAME Lga
 * @property string $CITY_NAME City
 * @property string $ADDRESS 详细地址
 * @property int $IS_DEFAULT 是否默认
 * @property int $CREATED_AT 创建时间
 * @property string $UPDATER 修改人
 * @property int $UPDATED_AT 修改时间
 */
class BaReceiveAddress extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%BA_RECEIVE_ADDRESS}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['USER_ID', 'USER_NAME', 'CONSIGNEE', 'MOBILE', 'PROVINCE', 'ADDRESS'], 'required'],
            [['PROVINCE', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT'], 'integer'],
            [['ID', 'USER_ID'], 'string', 'max' => 32],
            [['USER_NAME'], 'string', 'max' => 16],
            [['CONSIGNEE'], 'string', 'max' => 120],
            [['MOBILE'], 'string', 'max' => 11],
            [['ADDRESS'], 'string', 'max' => 255],
            [['LGA_NAME'], 'string', 'max' => 50],
            [['CITY_NAME'], 'string', 'max' => 50],
            [['UPDATER'], 'string', 'max' => 10],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'USER_ID' => '用户ID',
            'USER_NAME' => '用户编号',
            'CONSIGNEE' => '收货人',
            'MOBILE' => '收货人手机',
            'PROVINCE' => '省份名称',
            'CITY' => '城市名称',
            'COUNTY' => '县区名称',
            'LGA_NAME' => 'Lga Name',
            'CITY_NAME' => 'City Name',
            'ADDRESS' => '详细地址',
            'IS_DEFAULT' => '是否默认',
            'CREATED_AT' => '创建时间',
            'UPDATER' => '修改人',
            'UPDATED_AT' => '修改时间',
        ];
    }
}
