<?php

namespace common\models;

/**
 * This is the model class for table "{{%SHOP_GOODS_NATURE}}".
 *
 * @property string ID
 * @property string GOODS_ID 商品ID
 * @property string COUNTRY_ID 国家ID
 * @property int    LOCAL_CURRENCY_ID 汇率ID
 * @property double MARKET_PRICE 市场价格
 * @property double SELL_PRICE 销售价格
 * @property double TAX_RATE 税率
 */
class ShopGoodsNature extends \common\components\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%SHOP_GOODS_NATURE}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['GOODS_ID', 'COUNTRY_ID', 'LOCAL_CURRENCY_ID', 'MARKET_PRICE', 'SELL_PRICE', 'TAX_RATE'], 'required'],
            [['TAX_RATE', 'MARKET_PRICE', 'SELL_PRICE', 'LOCAL_CURRENCY_ID'], 'number'],
            [['ID'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'GOODS_ID' => '商品ID',
            'COUNTRY_ID' => '国家ID',
            'LOCAL_CURRENCY_ID' => '汇率ID',
            'MARKET_PRICE' => '市场价格',
            'SELL_PRICE' => '销售价格',
            'TAX_RATE' => '税率',
        ];
    }
}
