+ 立即免费创建此表 返回数据库大全

MySQL建表SQL语句

数据库结构:商城系统-商品表:https://open.yesapi.cn/tablelist/yesapi_yshopmall_yx_store_product.html


-- 数据库大全:商城系统-商品表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_yshopmall_yx_store_product` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `image` varchar(256) NULL COMMENT '商品图片',
    `slider_image` varchar(2000) NULL COMMENT '轮播图',
    `store_name` varchar(128) NULL COMMENT '商品名称',
    `store_info` varchar(256) NULL COMMENT '商品简介',
    `keyword` varchar(256) NULL COMMENT '关键字',
    `bar_code` varchar(15) NULL COMMENT '产品条码(一维码)',
    `cate_id` varchar(64) NULL COMMENT '分类id',
    `price` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '商品价格',
    `vip_price` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '会员价格',
    `ot_price` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '市场价',
    `postage` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '邮费',
    `unit_name` varchar(32) NULL COMMENT '单位名',
    `sort` smallint(6) NULL DEFAULT '0' COMMENT '排序',
    `sales` mediumint(8) NULL DEFAULT '0' COMMENT '销量',
    `stock` mediumint(8) NULL DEFAULT '0' COMMENT '库存',
    `is_show` tinyint(1) NULL DEFAULT '1' COMMENT '状态(0:未上架,1:上架)',
    `is_hot` tinyint(1) NULL DEFAULT '0' COMMENT '是否热卖',
    `is_benefit` tinyint(1) NULL DEFAULT '0' COMMENT '是否优惠',
    `is_best` tinyint(1) NULL DEFAULT '0' COMMENT '是否精品',
    `is_new` tinyint(1) NULL DEFAULT '0' COMMENT '是否新品',
    `description` text NULL COMMENT '产品描述',
    `create_time` datetime NULL COMMENT '添加时间',
    `is_postage` tinyint(3) NULL DEFAULT '0' COMMENT '是否包邮',
    `is_del` tinyint(3) NULL DEFAULT '0' COMMENT '是否删除',
    `mer_use` tinyint(3) NULL DEFAULT '0' COMMENT '商户是否代理 0不可代理1可代理',
    `give_integral` decimal(8,2) unsigned NULL COMMENT '获得积分',
    `cost` decimal(8,2) unsigned NULL COMMENT '成本价',
    `is_good` tinyint(1) NULL DEFAULT '0' COMMENT '是否优品推荐',
    `ficti` mediumint(9) NULL DEFAULT '100' COMMENT '虚拟销量',
    `browse` int(11) NULL DEFAULT '0' COMMENT '浏览量',
    `is_sub` tinyint(1) NULL DEFAULT '0' COMMENT '是否单独分佣',
    `temp_id` int(11) NULL COMMENT '运费模板ID',
    `spec_type` tinyint(1) NULL DEFAULT '0' COMMENT '规格 0单 1多',
    KEY `price` (`price`),
    KEY `sort` (`sort`),
    KEY `sales` (`sales`),
    KEY `is_show` (`is_show`),
    KEY `is_hot` (`is_hot`),
    KEY `is_benefit` (`is_benefit`),
    KEY `is_best` (`is_best`),
    KEY `is_new` (`is_new`),
    KEY `create_time` (`create_time`),
    KEY `is_postage` (`is_postage`),
    KEY `is_del` (`is_del`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '商城系统-商品表';

复制后,到数据库执行,即可创建此数据库表。


MySQL数据库表结构设计

第 1-33 条, 共 33 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
imagevarchar(256)商品图片无索引
slider_imagevarchar(2000)轮播图无索引
store_namevarchar(128)商品名称无索引
store_infovarchar(256)商品简介无索引
keywordvarchar(256)关键字无索引
bar_codevarchar(15)产品条码(一维码)无索引
cate_idvarchar(64)分类id无索引
pricedecimal(8,2) unsigned0.00商品价格普通索引0.00
vip_pricedecimal(8,2) unsigned0.00会员价格无索引0.00
ot_pricedecimal(8,2) unsigned0.00市场价无索引0.00
postagedecimal(8,2) unsigned0.00邮费无索引0.00
unit_namevarchar(32)单位名无索引
sortsmallint(6)0排序普通索引0
salesmediumint(8)0销量普通索引0
stockmediumint(8)0库存无索引0
is_showtinyint(1)1状态(0:未上架,1:上架)普通索引1
is_hottinyint(1)0是否热卖普通索引0
is_benefittinyint(1)0是否优惠普通索引0
is_besttinyint(1)0是否精品普通索引0
is_newtinyint(1)0是否新品普通索引0
descriptiontext产品描述无索引
create_timedatetime添加时间普通索引
is_postagetinyint(3)0是否包邮普通索引0
is_deltinyint(3)0是否删除普通索引0
mer_usetinyint(3)0商户是否代理 0不可代理1可代理无索引0
give_integraldecimal(8,2) unsigned获得积分无索引
costdecimal(8,2) unsigned成本价无索引
is_goodtinyint(1)0是否优品推荐无索引0
fictimediumint(9)100虚拟销量无索引100
browseint(11)0浏览量无索引0
is_subtinyint(1)0是否单独分佣无索引0
temp_idint(11)运费模板ID无索引
spec_typetinyint(1)0规格 0单 1多无索引0

猜你喜欢

MySQL数据库设计 商城系统-支付宝配置类

MySQL数据库设计 商城系统-代码生成字段信息存储

MySQL数据库设计 商城系统-部门

MySQL数据库设计 商城系统-数据字典

MySQL数据库设计 商城系统-数据字典详情

MySQL数据库设计 商城系统-邮箱配置

MySQL数据库设计 商城系统-代码生成器配置

MySQL数据库设计 商城系统-代码生成测试

MySQL数据库设计 商城系统-岗位

MySQL数据库设计 商城系统-本地存储

MySQL数据库设计 商城系统-系统日志

MySQL数据库设计 商城系统-菜单

MySQL数据库设计 商城系统-Sm.Ms图床

MySQL数据库设计 商城系统-七牛云配置

MySQL数据库设计 商城系统-七牛云文件存储

MySQL数据库设计 商城系统-定时任务

MySQL数据库设计 商城系统-定时任务日志

MySQL数据库设计 商城系统-角色表

MySQL数据库设计 商城系统-角色部门关联

MySQL数据库设计 商城系统-角色菜单关联



回到顶部 ↑