Commit faae7377 authored by 孙磊's avatar 孙磊

商品品牌、标签model

Signed-off-by: 孙磊's avatarsunlei <sunlei@romens.cn>
parent 9117d9e1
......@@ -328,7 +328,7 @@ return [
[
'class' => 'yii\rest\UrlRule',
'controller' => [
'v1/shopgoods/import-goods',
'v1/shopgoods/import-goods-info',
],
'extraPatterns' => [
'POST,OPTIONS shop-goods-import' => 'shop-goods-import',
......
<?php
namespace app\models\v1\goods;
namespace app\models\v1\shopgoods;
use Yii;
use app\models\v1\BaseModel;
/**
* This is the model class for table "shop_goods".
*
......
<?php
namespace app\models;
use Yii;
use app\models\v1\BaseModel;
/**
* This is the model class for table "shop_goods_brand".
*
* @property string $GUID
* @property string|null $ORG_GUID 组织机构号
* @property string|null $CODE 品牌编码
* @property string|null $NAME 品牌名称
* @property string|null $LOGO 品牌logo
* @property string|null $DESCRIPTION 品牌描述
* @property string|null $AFTER_SERVICE 售后服务
* @property string|null $AD 广告
* @property string|null $TITLE 标题
* @property string|null $KEY_WORDS 关键字
* @property string|null $PAGE_DESC 页降序
* @property string|null $ORDER_INDEX 顺序索引
* @property string|null $HOST_NAME 图片域名
* @property string|null $PIC_EXTENSIONS 图片后缀
*/
class ShopGoodsBrand extends BaseModel
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'shop_goods_brand';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['GUID'], 'required'],
[['DESCRIPTION', 'AFTER_SERVICE', 'AD'], 'string'],
[['GUID', 'ORG_GUID', 'CODE', 'TITLE', 'KEY_WORDS', 'HOST_NAME'], 'string', 'max' => 50],
[['NAME', 'LOGO', 'PAGE_DESC', 'ORDER_INDEX', 'PIC_EXTENSIONS'], 'string', 'max' => 100],
[['GUID'], 'unique'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'GUID' => 'Guid',
'ORG_GUID' => 'Org Guid',
'CODE' => 'Code',
'NAME' => 'Name',
'LOGO' => 'Logo',
'DESCRIPTION' => 'Description',
'AFTER_SERVICE' => 'After Service',
'AD' => 'Ad',
'TITLE' => 'Title',
'KEY_WORDS' => 'Key Words',
'PAGE_DESC' => 'Page Desc',
'ORDER_INDEX' => 'Order Index',
'HOST_NAME' => 'Host Name',
'PIC_EXTENSIONS' => 'Pic Extensions',
];
}
}
<?php
namespace app\models;
use Yii;
use app\models\v1\BaseModel;
/**
* This is the model class for table "shop_goods_property".
*
* @property string $GUID
* @property string|null $ORG_GUID 组织机构号
* @property string|null $CODE 属性编码
* @property string|null $NAME 属性名称
* @property string|null $DESCRIPTION 属性描述
* @property string|null $TYPE 属性类型
*/
class ShopGoodsProperty extends BaseModel
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'shop_goods_property';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['GUID'], 'required'],
[['DESCRIPTION'], 'string'],
[['GUID', 'ORG_GUID', 'CODE', 'TYPE'], 'string', 'max' => 50],
[['NAME'], 'string', 'max' => 100],
[['GUID'], 'unique'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'GUID' => 'Guid',
'ORG_GUID' => 'Org Guid',
'CODE' => 'Code',
'NAME' => 'Name',
'DESCRIPTION' => 'Description',
'TYPE' => 'Type',
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment