<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%ORDER_STANDARD}}".
 *
 * @property string $ID
 * @property string $SN
 * @property string $DEC_SN
 * @property string $USER_ID
 * @property string $USER_NAME
 * @property string $ORDER_TYPE
 * @property string $ORDER_AMOUNT
 * @property string $PV
 * @property string $PAY_AMOUNT
 * @property string $PAY_PV
 * @property int $PAY_AT
 * @property double $FREIGHT
 * @property double $PAY_FREIGHT
 * @property int $DELIVERY_STATUS
 * @property int $DELIVERY_PERIOD
 * @property int $DELIVERY_AT
 * @property string $EXPRESS_COMPANY
 * @property string $ORDER_TRACK_NO
 * @property int $EXPRESS_TYPE
 * @property string $FRONT_REMARK
 * @property string $REMARK
 * @property int $PERIOD_NUM
 * @property int $CALC_MONTH 结算月
 * @property int $STATUS
 * @property string $CONSIGNEE
 * @property string $MOBILE
 * @property string $TEL
 * @property string $PROVINCE
 * @property string $CITY
 * @property string $COUNTY
 * @property string $ADDRESS
 * @property int $CREATED_AT
 * @property string $CREATE_USER
 * @property int $UPDATED_AT
 * @property string $UPDATER
 * @property int $IS_DELETE
 * @property int $DELETED_AT
 * @property string $PAY_TYPE
 * @property string $WAREHOUSE
 */
class OrderStandard extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%ORDER_STANDARD}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['ID', 'USER_ID', 'USER_NAME', 'ORDER_TYPE', 'CALC_MONTH', 'CREATE_USER'], 'required'],
            [['ORDER_AMOUNT', 'PV', 'PAY_AMOUNT', 'PAY_PV', 'FREIGHT', 'PAY_FREIGHT'], 'number'],
            [['PAY_AT', 'DELIVERY_STATUS', 'DELIVERY_PERIOD', 'DELIVERY_AT', 'EXPRESS_TYPE', 'PERIOD_NUM', 'CALC_MONTH', 'STATUS', 'CREATED_AT', 'UPDATED_AT', 'IS_DELETE', 'DELETED_AT'], 'integer'],
            [['REMARK'], 'string'],
            [['ID', 'SN', 'DEC_SN', 'USER_ID', 'ORDER_TRACK_NO', 'PROVINCE', 'CITY', 'COUNTY', 'PAY_TYPE'], 'string', 'max' => 32],
            [['USER_NAME', 'TEL', 'CREATE_USER', 'UPDATER', 'WAREHOUSE'], 'string', 'max' => 16],
            [['ORDER_TYPE'], 'string', 'max' => 12],
            [['EXPRESS_COMPANY'], 'string', 'max' => 128],
            [['FRONT_REMARK'], 'string', 'max' => 1000],
            [['CONSIGNEE'], 'string', 'max' => 120],
            [['MOBILE'], 'string', 'max' => 11],
            [['ADDRESS'], 'string', 'max' => 255],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'SN' => 'Sn',
            'DEC_SN' => 'Dec  Sn',
            'USER_ID' => 'User  ID',
            'USER_NAME' => 'User  Name',
            'ORDER_TYPE' => 'Order  Type',
            'ORDER_AMOUNT' => 'Order  Amount',
            'PV' => 'Pv',
            'PAY_AMOUNT' => 'Pay  Amount',
            'PAY_PV' => 'Pay  Bv',
            'PAY_AT' => 'Pay  At',
            'FREIGHT' => 'Freight',
            'PAY_FREIGHT' => 'Pay  Freight',
            'DELIVERY_STATUS' => 'Delivery  Status',
            'DELIVERY_PERIOD' => 'Delivery  Period',
            'DELIVERY_AT' => 'Delivery  At',
            'EXPRESS_COMPANY' => 'Express  Company',
            'ORDER_TRACK_NO' => 'Order  Track  No',
            'EXPRESS_TYPE' => 'Express  Type',
            'FRONT_REMARK' => 'Front  Remark',
            'REMARK' => 'Remark',
            'PERIOD_NUM' => 'Period  Num',
            'CALC_MONTH' => '结算月',
            'STATUS' => 'Status',
            'CONSIGNEE' => 'Consignee',
            'MOBILE' => 'Mobile',
            'TEL' => 'Tel',
            'PROVINCE' => 'Province',
            'CITY' => 'City',
            'COUNTY' => 'County',
            'ADDRESS' => 'Address',
            'CREATED_AT' => 'Created  At',
            'CREATE_USER' => 'Create  User',
            'UPDATED_AT' => 'Updated  At',
            'UPDATER' => 'Updater',
            'IS_DELETE' => 'Is  Delete',
            'DELETED_AT' => 'Deleted  At',
            'PAY_TYPE' => 'Pay  Type',
            'WAREHOUSE' => 'Warehouse',
        ];
    }
}
