MySQL Create Table SQL
Table Structure: okayapi_smpss_goods:/tablelist/okayapi_smpss_goods.html
-- MySQL Table okayapi_smpss_goods
-- From: OkayAPI.com
CREATE TABLE `okayapi_smpss_goods` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`goods_name` varchar(100) NOT NULL COMMENT '',
`goods_sn` varchar(32) NOT NULL COMMENT '',
`cat_id` int(10) NOT NULL COMMENT '',
`stock` float NOT NULL DEFAULT '0' COMMENT '库存',
`warn_stock` tinyint(3) NOT NULL DEFAULT '1' COMMENT '库存警告',
`weight` varchar(32) NOT NULL COMMENT '',
`unit` varchar(32) NOT NULL COMMENT '',
`out_price` decimal(8,2) NOT NULL COMMENT '销售价',
`in_price` decimal(8,2) NOT NULL COMMENT '进价-未使用',
`market_price` decimal(8,2) NOT NULL COMMENT '市场价',
`promote_price` decimal(8,2) NOT NULL COMMENT '促销价',
`ispromote` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
`promote_start_date` date NOT NULL COMMENT '促销开始时间',
`promote_end_date` date NOT NULL COMMENT '促销结束时间',
`ismemberprice` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否享受会员价',
`creatymd` date NOT NULL COMMENT '商品添加时间',
`creatdateline` int(10) NOT NULL COMMENT '',
`lastinymd` date NOT NULL COMMENT '最后进货时间',
`lastindateline` int(10) NOT NULL COMMENT '',
`goods_desc` varchar(200) NOT NULL COMMENT '商品简介',
`countamount` float(10,2) unsigned NOT NULL COMMENT '商品总进价',
`salesamount` float(10,2) unsigned NOT NULL COMMENT '销售总额',
KEY `goods_name` (`goods_name`),
KEY `goods_sn` (`goods_sn`),
KEY `cat_id` (`cat_id`),
KEY `stock` (`stock`),
KEY `warn_stock` (`warn_stock`),
KEY `weight` (`weight`),
KEY `unit` (`unit`),
KEY `out_price` (`out_price`),
KEY `in_price` (`in_price`),
KEY `market_price` (`market_price`),
KEY `promote_price` (`promote_price`),
KEY `ispromote` (`ispromote`),
KEY `promote_start_date` (`promote_start_date`),
KEY `promote_end_date` (`promote_end_date`),
KEY `ismemberprice` (`ismemberprice`),
KEY `creatymd` (`creatymd`),
KEY `creatdateline` (`creatdateline`),
KEY `lastinymd` (`lastinymd`),
KEY `lastindateline` (`lastindateline`),
KEY `goods_desc` (`goods_desc`),
KEY `countamount` (`countamount`),
KEY `salesamount` (`salesamount`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '进销存-商品表';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-22 of 22 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
goods_name | varchar(100) | 否 | ||||
goods_sn | varchar(32) | 否 | ||||
cat_id | int(10) | 否 | ||||
stock | float | 0 | 否 | 库存 | 0 | |
warn_stock | tinyint(3) | 1 | 否 | 库存警告 | 1 | |
weight | varchar(32) | 否 | ||||
unit | varchar(32) | 否 | ||||
out_price | decimal(8,2) | 否 | 销售价 | |||
in_price | decimal(8,2) | 否 | 进价-未使用 | |||
market_price | decimal(8,2) | 否 | 市场价 | |||
promote_price | decimal(8,2) | 否 | 促销价 | |||
ispromote | tinyint(1) | 0 | 否 | 是否启用 | 0 | |
promote_start_date | date | 否 | 促销开始时间 | |||
promote_end_date | date | 否 | 促销结束时间 | |||
ismemberprice | tinyint(1) | 1 | 否 | 是否享受会员价 | 1 | |
creatymd | date | 否 | 商品添加时间 | Normal Index | ||
creatdateline | int(10) | 否 | ||||
lastinymd | date | 否 | 最后进货时间 | |||
lastindateline | int(10) | 否 | ||||
goods_desc | varchar(200) | 否 | 商品简介 | |||
countamount | float(10,2) unsigned | 否 | 商品总进价 | |||
salesamount | float(10,2) unsigned | 否 | 销售总额 |