MySQL Create Table SQL
Table Structure: okayapi_smpss_sales:/tablelist/okayapi_smpss_sales.html
-- MySQL Table okayapi_smpss_sales
-- From: OkayAPI.com
CREATE TABLE `okayapi_smpss_sales` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`goods_id` int(10) NOT NULL COMMENT '',
`goods_sn` varchar(16) NOT NULL COMMENT '',
`goods_name` varchar(100) NOT NULL COMMENT '',
`cat_id` int(10) NOT NULL COMMENT '',
`order_id` varchar(14) NOT NULL COMMENT '',
`mid` int(10) NOT NULL COMMENT '',
`membercardid` varchar(16) NOT NULL COMMENT '会员卡卡号',
`realname` varchar(32) NOT NULL COMMENT '',
`num` float NOT NULL COMMENT '',
`price` decimal(8,2) NOT NULL COMMENT '实际售价(优惠后的金额)',
`out_price` decimal(8,2) NOT NULL COMMENT '商品表的售价(未优惠的价格)',
`in_price` decimal(8,2) NOT NULL COMMENT '销售时的平均进价',
`dateymd` date NOT NULL COMMENT '',
`dateline` int(10) NOT NULL COMMENT '',
`m_discount` float(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员优惠金额',
`p_discount` float(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '促销优惠的金额',
`refund_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '退款类型 0无退款 1全额退款 2部分退款',
`refund_num` float NOT NULL DEFAULT '0' COMMENT '退货数量',
`refund_amount` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`sales_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '销售类型 0正常销售1退货销售',
KEY `goods_id` (`goods_id`),
KEY `goods_sn` (`goods_sn`),
KEY `goods_name` (`goods_name`),
KEY `cat_id` (`cat_id`),
KEY `order_id` (`order_id`),
KEY `mid` (`mid`),
KEY `membercardid` (`membercardid`),
KEY `realname` (`realname`),
KEY `num` (`num`),
KEY `price` (`price`),
KEY `out_price` (`out_price`),
KEY `in_price` (`in_price`),
KEY `dateymd` (`dateymd`),
KEY `dateline` (`dateline`),
KEY `m_discount` (`m_discount`),
KEY `p_discount` (`p_discount`),
KEY `refund_type` (`refund_type`),
KEY `refund_num` (`refund_num`),
KEY `refund_amount` (`refund_amount`),
KEY `sales_type` (`sales_type`),
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-20 of 20 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
goods_id | int(10) | 否 | Normal Index | |||
goods_sn | varchar(16) | 否 | Normal Index | |||
goods_name | varchar(100) | 否 | ||||
cat_id | int(10) | 否 | ||||
order_id | varchar(14) | 否 | Normal Index | |||
mid | int(10) | 否 | ||||
membercardid | varchar(16) | 否 | 会员卡卡号 | Normal Index | ||
realname | varchar(32) | 否 | ||||
num | float | 否 | ||||
price | decimal(8,2) | 否 | 实际售价(优惠后的金额) | |||
out_price | decimal(8,2) | 否 | 商品表的售价(未优惠的价格) | |||
in_price | decimal(8,2) | 否 | 销售时的平均进价 | |||
dateymd | date | 否 | Normal Index | |||
dateline | int(10) | 否 | ||||
m_discount | float(10,2) unsigned | 0.00 | 否 | 会员优惠金额 | 0.00 | |
p_discount | float(10,2) unsigned | 0.00 | 否 | 促销优惠的金额 | 0.00 | |
refund_type | tinyint(1) | 0 | 否 | 退款类型 0无退款 1全额退款 2部分退款 | 0 | |
refund_num | float | 0 | 否 | 退货数量 | 0 | |
refund_amount | decimal(8,2) | 0.00 | 否 | 退款金额 | 0.00 | |
sales_type | tinyint(4) | 0 | 否 | 销售类型 0正常销售1退货销售 | 0 |