| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%cloud_goods_bind}}".
- *
- * @property integer $id
- * @property integer $cloud_goods_id
- * @property integer $cloud_attr_id
- * @property integer $cloud_supplier_id
- * @property integer $goods_id
- * @property integer $attr_id
- * @property integer $is_delete
- * @property integer $created_at
- */
- class CloudGoodsBind extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%cloud_goods_bind}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['cloud_goods_id', 'cloud_attr_id', 'cloud_supplier_id', 'goods_id', 'store_id'], 'integer'],
- ['attr_id','validateAttrId']
- ];
- }
-
- public function validateAttrId(){
- if(!is_int($this->attr_id) && !is_string($this->attr_id)){
- $this->addError('attr_id', 'attr_id type error');
- }
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'cloud_goods_id' => '云仓商品id',
- 'cloud_attr_id' => '云仓商品属性id',
- 'cloud_supplier_id' => '云仓供货商id',
- 'store_id' => '店铺id',
- 'goods_id' => '云联储商品id',
- 'attr_id' => '云联储商品属性id',
- 'is_delete' => 'Is Delete',
- 'created_at' => 'Addtime',
- ];
- }
- }
|