|
|
@@ -12,7 +12,6 @@ use Yii;
|
|
|
* @property string country_id 国家ID
|
|
|
* @property double freight 运费
|
|
|
* @property double free_shipping 免运费阈值
|
|
|
- * @property int currency_id 币种ID
|
|
|
* @property int created_at 创建时间
|
|
|
* @property int updated_at 更新时间
|
|
|
*/
|
|
|
@@ -32,8 +31,8 @@ class FreeTemplate extends \common\components\ActiveRecord
|
|
|
public function rules()
|
|
|
{
|
|
|
return [
|
|
|
- [['country_id', 'freight', 'free_shipping', 'currency_id'], 'required'],
|
|
|
- [['freight', 'free_shipping', 'currency_id'], 'number'],
|
|
|
+ [['country_id', 'freight', 'free_shipping'], 'required'],
|
|
|
+ [['freight', 'free_shipping'], 'number'],
|
|
|
[['country_id'], 'unique'],
|
|
|
];
|
|
|
}
|
|
|
@@ -48,7 +47,6 @@ class FreeTemplate extends \common\components\ActiveRecord
|
|
|
'country_id' => '国家ID',
|
|
|
'freight' => '运费',
|
|
|
'free_shipping' => '免运费阈值',
|
|
|
- 'currency_id' => '币种ID',
|
|
|
'created_at' => '创建时间',
|
|
|
'updated_at' => '更新时间',
|
|
|
];
|
|
|
@@ -59,11 +57,6 @@ class FreeTemplate extends \common\components\ActiveRecord
|
|
|
return $this->hasOne(Countries::class, ['id' => 'country_id']);
|
|
|
}
|
|
|
|
|
|
- public function currency()
|
|
|
- {
|
|
|
- return $this->hasOne(Currency::class, ['id' => 'currency_id']);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 从缓存获取信息
|
|
|
* @return array|mixed|\yii\db\ActiveRecord[]
|