| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "xhGoods".
- *
- * @property int $id
- * @property string $goodsName 商品名称
- * @property string $itemNumber 商品编号
- * @property string $cover 封面
- * @property string $shopImg 商品图片列表
- * @property int $stock 库存
- * @property string $price 价格
- * @property int $userId 创建商品的用户id
- * @property int $adminId 创建商品的管理员id
- * @property int $merchantId 商户id
- * @property string $categoryId 分类id列表
- * @property string $representative 花语,代表意义
- * @property string $sendArea 配送范围
- * @property int $isCharge 是否收取快递费,1:收取(默认);0:不收取
- * @property int $sold 已售出,商家自定义的销售量
- * @property int $actualSold 实际的销售量,对外展示的销售将是sold + actualSold
- * @property string $material 花材,鲜花主花材
- * @property int $flowerNum 多少朵
- * @property int $fitPeople 适用人群,爱人老师客户领导/长辈朋友/同事病人
- * @property int $fitFestival 适用节日,情人节圣诞节春节元旦3.8妇女节清明母亲节父亲节感恩节教师节中秋节七夕其他白色情人节建军节
- * @property string $content 正文内容
- * @property int $style 商品类型 0普通商品
- * @property int $riseAmount 商品单独定义涨价金额或百分比数,涨价方式riseType参考xhGoodsSetting表
- * @property int $inTurn 排序
- * @property int $delStatus 删除状态 0正常,没有删除 1删除
- * @property int $status 商品状态 0正常1下架2删除
- * @property string $createTime 创建时间
- * @property string $updateTime
- * @property string $urlQrCode 商品链接二维码地址
- * @property string $shortUrl 商品短链接地址
- * @property string $multiPrice 多种价格id 例(1,2,3,4)
- */
- class xhGoods extends xhBaseModel
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'xhGoods';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['stock', 'userId', 'adminId', 'merchantId', 'isCharge', 'sold', 'actualSold', 'flowerNum', 'fitPeople', 'fitFestival', 'style', 'riseAmount', 'inTurn', 'delStatus', 'status'], 'integer'],
- [['price'], 'number'],
- [['content', 'createTime'], 'required'],
- [['content'], 'string'],
- [['createTime', 'updateTime'], 'safe'],
- [['goodsName', 'categoryId'], 'string', 'max' => 100],
- [['itemNumber'], 'string', 'max' => 50],
- [['cover', 'urlQrCode'], 'string', 'max' => 200],
- [['shopImg'], 'string', 'max' => 800],
- [['representative', 'sendArea', 'material', 'shortUrl'], 'string', 'max' => 500],
- [['multiPrice'], 'string', 'max' => 255],
- [['itemNumber'], 'unique'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'goodsName' => 'Goods Name',
- 'itemNumber' => 'Item Number',
- 'cover' => 'Cover',
- 'shopImg' => 'Shop Img',
- 'stock' => 'Stock',
- 'price' => 'Price',
- 'userId' => 'User ID',
- 'adminId' => 'Admin ID',
- 'merchantId' => 'Merchant ID',
- 'categoryId' => 'Category ID',
- 'representative' => 'Representative',
- 'sendArea' => 'Send Area',
- 'isCharge' => 'Is Charge',
- 'sold' => 'Sold',
- 'actualSold' => 'Actual Sold',
- 'material' => 'Material',
- 'flowerNum' => 'Flower Num',
- 'fitPeople' => 'Fit People',
- 'fitFestival' => 'Fit Festival',
- 'content' => 'Content',
- 'style' => 'Style',
- 'riseAmount' => 'Rise Amount',
- 'inTurn' => 'In Turn',
- 'delStatus' => 'Del Status',
- 'status' => 'Status',
- 'createTime' => 'Create Time',
- 'updateTime' => 'Update Time',
- 'urlQrCode' => 'Url Qr Code',
- 'shortUrl' => 'Short Url',
- 'multiPrice' => 'Multi Price',
- ];
- }
- }
|