<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%ORDER_STANDARD_GOODS}}".
 *
 * @property string $ID
 * @property string $ORDER_SN
 * @property string $GOODS_TITLE
 * @property string $PRICE
 * @property string $REAL_PRICE
 * @property string $PV
 * @property string $REAL_PV
 * @property string $SKU_CODE
 * @property int $BUY_NUMS
 * @property int $POINT
 * @property int $PERIOD_NUM
 * @property int $CALC_MONTH 结算月
 * @property string $PAY_TYPE
 */
class OrderStandardGoods extends \common\components\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%ORDER_STANDARD_GOODS}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['ID', 'ORDER_SN', 'GOODS_TITLE', 'SKU_CODE', 'CALC_MONTH'], 'required'],
            [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV'], 'number'],
            [['BUY_NUMS', 'POINT', 'PERIOD_NUM', 'CALC_MONTH'], 'integer'],
            [['ID', 'ORDER_SN', 'PAY_TYPE'], 'string', 'max' => 32],
            [['GOODS_TITLE'], 'string', 'max' => 255],
            [['SKU_CODE'], 'string', 'max' => 16],
            [['ID'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'ORDER_SN' => 'Order  Sn',
            'GOODS_TITLE' => 'Goods  Title',
            'PRICE' => 'Price',
            'REAL_PRICE' => 'Real  Price',
            'PV' => 'Bv',
            'REAL_PV' => 'Real  Bv',
            'SKU_CODE' => 'Sku  Code',
            'BUY_NUMS' => 'Buy  Nums',
            'POINT' => 'Point',
            'PERIOD_NUM' => 'Period  Num',
            'CALC_MONTH' => '结算月',
            'PAY_TYPE' => 'Pay  Type',
        ];
    }
}
