+ Use This Table All Design

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 NameField TypeDefaultIS NULLField CommentIndexDemo Data
goods_idint(10)Normal Index
goods_snvarchar(16)Normal Index
goods_namevarchar(100)
cat_idint(10)
order_idvarchar(14)Normal Index
midint(10)
membercardidvarchar(16)会员卡卡号Normal Index
realnamevarchar(32)
numfloat
pricedecimal(8,2)实际售价(优惠后的金额)
out_pricedecimal(8,2)商品表的售价(未优惠的价格)
in_pricedecimal(8,2)销售时的平均进价
dateymddateNormal Index
datelineint(10)
m_discountfloat(10,2) unsigned0.00会员优惠金额0.00
p_discountfloat(10,2) unsigned0.00促销优惠的金额0.00
refund_typetinyint(1)0退款类型 0无退款 1全额退款 2部分退款0
refund_numfloat0退货数量0
refund_amountdecimal(8,2)0.00退款金额0.00
sales_typetinyint(4)0销售类型 0正常销售1退货销售0

Guess You Like

MySQL Table Design okayapi_smpss_admin

MySQL Table Design okayapi_smpss_category

MySQL Table Design okayapi_smpss_goods

MySQL Table Design okayapi_smpss_group

MySQL Table Design okayapi_smpss_log

MySQL Table Design okayapi_smpss_mbgroup

MySQL Table Design okayapi_smpss_member

MySQL Table Design okayapi_smpss_purchase

MySQL Table Design okayapi_smpss_region

MySQL Table Design okayapi_smpss_system

MySQL Table Design okayapi_smpss_tempsales

MySQL Table Design okayapi_dberp_accounts_receivable

MySQL Table Design okayapi_dberp_accounts_receivable_log

MySQL Table Design okayapi_dberp_admin

MySQL Table Design okayapi_dberp_admin_group

MySQL Table Design okayapi_dberp_app

MySQL Table Design okayapi_dberp_brand

MySQL Table Design okayapi_dberp_customer

MySQL Table Design okayapi_dberp_customer_category

MySQL Table Design okayapi_dberp_finance_payable

TOP ↑