91 行
6.5 KiB
PHP
可执行文件
91 行
6.5 KiB
PHP
可执行文件
<?php
|
||
|
||
namespace Common\Model;
|
||
|
||
use Think\Model\ViewModel;
|
||
|
||
//[1.8.50]
|
||
|
||
/**
|
||
* 商户商品与规格视图模型
|
||
* Class SkuMGoodsViewModel
|
||
* @package Common\Model
|
||
*/
|
||
class SkuMGoodsViewModel extends BaseViewModel
|
||
{
|
||
public $viewFields = array(
|
||
'goods' => array(
|
||
'_table' => 'ls_retail_mgoods',
|
||
'id', //int(11) NOT NULL AUTO_INCREMENT,
|
||
'goods_name', //varchar(255) DEFAULT NULL COMMENT '零售货物名称。',
|
||
'goods_class_id', //int(11) DEFAULT NULL COMMENT '货物所属类别id',
|
||
'good_number', //varchar(15) DEFAULT NULL COMMENT '货号',
|
||
'purch_price', //float(11,2) DEFAULT '0.00' COMMENT '成本价',
|
||
'retail_price', //float(11,2) DEFAULT '0.00' COMMENT '零售价',
|
||
'vip_price', //float(11,2) DEFAULT NULL COMMENT '会员价(已废弃)',
|
||
'online_price', //float(11,2) DEFAULT NULL COMMENT '线上价',
|
||
'plus_price', //decimal(20,2) DEFAULT NULL COMMENT 'plus会员价',
|
||
'addtime', //int(11) DEFAULT NULL COMMENT '添加时间',
|
||
'status', //int(1) DEFAULT NULL COMMENT '状态:0,正常,1,下架,2,删除。',
|
||
'goods_num', //decimal(11,3) DEFAULT '0.000' COMMENT '商品数量。。',
|
||
'goods_order', //int(11) DEFAULT '1' COMMENT '商品排序',
|
||
'more_num', //decimal(11,3) DEFAULT NULL COMMENT '商品超量;超过该字段的库存数量即为超量',
|
||
'less_num', //decimal(11,3) DEFAULT NULL COMMENT '库存预警',
|
||
'sell_num', //decimal(11,3) DEFAULT '0.000' COMMENT '出售数量',
|
||
'company', //varchar(255) DEFAULT NULL COMMENT '单位',
|
||
'specifications', //varchar(255) DEFAULT NULL COMMENT '规格',
|
||
'merchantid', //int(11) DEFAULT NULL COMMENT '商户id。',
|
||
'goods_code', //varchar(20) DEFAULT '' COMMENT '商品条码。',
|
||
'issellonline', //int(1) DEFAULT '0' COMMENT '是否在商城中出售:0,不在,1,在商城出售。',
|
||
'vip_online_state', //tinyint(1) DEFAULT '0',
|
||
'vip_retail_state', //tinyint(1) DEFAULT '0',
|
||
'supplier_id', //int(11) DEFAULT '0',
|
||
'can_exchange_weigh', //int(1) DEFAULT '1' COMMENT '该商品是否称重计价 1:不称重 2:称重',
|
||
'details', //text COMMENT '商品详情',
|
||
'production_date', //varchar(15) DEFAULT NULL COMMENT '商品生产日期',
|
||
'shelf_life', //varchar(15) DEFAULT NULL COMMENT '商品到期日期',
|
||
'shop_mem_status', //tinyint(1) DEFAULT '2' COMMENT '是否开启商城会员价 1.开启 2.关闭',
|
||
'shop_mem_price', //decimal(10,2) DEFAULT NULL COMMENT '商城会员价格',
|
||
'store_mem_status', //tinyint(1) DEFAULT '2' COMMENT '是否开启店内会员价1.开启2关闭',
|
||
'store_mem_price', //decimal(10,2) DEFAULT NULL COMMENT '店内会员价格',
|
||
'plus_mem_status', //tinyint(1) DEFAULT '2' COMMENT 'plus会员价开关 1开启 2关闭',
|
||
'attribute', //tinyint(1) DEFAULT '1' COMMENT '是否开启sku 1关闭 2开启',
|
||
'goods_brand_id', //int(11) DEFAULT '0' COMMENT '商品品牌id',
|
||
'goods_yieldly_id', //int(10) DEFAULT '0' COMMENT '产地id',
|
||
'goods_image_id', //varchar(255) DEFAULT '0',
|
||
'integral_marketing', //tinyint(1) DEFAULT '0' COMMENT '积分营销 0关闭 1开启',
|
||
'marketing_methods', //tinyint(1) DEFAULT '1' COMMENT '营销方式 1比例占比 2自定义营销',
|
||
'shop_mem_integral', //int(11) DEFAULT '0' COMMENT '商城会员价自定义营销的积分',
|
||
'plus_mem_integral', //int(11) DEFAULT '0' COMMENT 'plus会员价自定义营销的积分',
|
||
'retail_state', //int(1) DEFAULT '0' COMMENT '是否在店内出售:0不在,1在',
|
||
'third_goods_code',
|
||
'_type' => 'LEFT',
|
||
),
|
||
'sku_goods' => array(
|
||
'_table' => 'ls_retail_sku_mgoods',
|
||
'id' => 'sku_id', // int(11) NOT NULL AUTO_INCREMENT,
|
||
'mgoods_id', // int(11) DEFAULT '0' COMMENT '商品id',
|
||
'sku_id_list', // varchar(255) DEFAULT NULL COMMENT '规格id拼接',
|
||
'purch_price' => 'sku_purch_price', // decimal(10,2) DEFAULT '0.00' COMMENT '成本价',
|
||
'online_price' => 'sku_online_price', // decimal(10,2) DEFAULT NULL COMMENT '商城价',
|
||
'retail_price' => 'sku_retail_price', // decimal(10,2) DEFAULT NULL COMMENT '门店价',
|
||
'goods_num' => 'sku_goods_num', // int(11) DEFAULT '0' COMMENT '商品库存',
|
||
'sku_num', // decimal(10,3) DEFAULT '1.000' COMMENT '单件库存',
|
||
'more_num' => 'sku_more_num', // decimal(11,3) DEFAULT NULL COMMENT '库存超量',
|
||
'less_num' => 'sku_less_num', // decimal(11,3) DEFAULT NULL COMMENT '库存预警',
|
||
'shop_mem_price' => 'sku_shop_mem_price',// decimal(10,2) DEFAULT NULL COMMENT '商城会员价格',
|
||
'store_mem_price' => 'sku_store_mem_price',// decimal(10,2) DEFAULT NULL COMMENT '店内会员价格',
|
||
'plus_price' => 'sku_plus_price', // decimal(20,2) DEFAULT NULL COMMENT 'plus会员价',
|
||
'addtime' => 'sku_addtime', // varchar(20) DEFAULT NULL COMMENT '添加时间',
|
||
'status' => 'sku_status', // tinyint(1) DEFAULT '1' COMMENT '0不启用 1启用',
|
||
'state', // tinyint(1) DEFAULT '0' COMMENT '0正常 1删除',
|
||
'sku_goods_number', // varchar(30) DEFAULT NULL COMMENT '规格货号',
|
||
'sku_code', // varchar(255) DEFAULT NULL COMMENT '商品规格条码',
|
||
'goods_img_id', // varchar(255) DEFAULT '0' COMMENT '图片id',
|
||
'shop_mem_integral' => 'sku_shop_mem_integral',// int(11) DEFAULT '0' COMMENT '商城会员价',
|
||
'plus_mem_integral' => 'sku_plus_mem_integral',// int(11) DEFAULT '0' COMMENT 'Plus会员价的积分',
|
||
'_on' => 'goods.id = sku_goods.mgoods_id',
|
||
),
|
||
|
||
);
|
||
} |