MySQL Create Table SQL
Table Structure: okayapi_dberp_sales_order:/tablelist/okayapi_dberp_sales_order.html
-- MySQL Table okayapi_dberp_sales_order
-- From: OkayAPI.com
CREATE TABLE `okayapi_dberp_sales_order` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`sales_order_sn` varchar(50) NOT NULL COMMENT '销售订单编号',
`customer_id` int(11) NOT NULL COMMENT '客户id',
`customer_contacts` varchar(30) NOT NULL COMMENT '客户联系人',
`customer_address` varchar(255) NOT NULL COMMENT '',
`customer_phone` varchar(20) NOT NULL COMMENT '客户手机',
`customer_telephone` varchar(20) NOT NULL COMMENT '客户电话',
`sales_order_goods_amount` decimal(19,4) NOT NULL DEFAULT '0.0000' COMMENT '客户购买商品金额',
`sales_order_tax_amount` decimal(19,4) NOT NULL DEFAULT '0.0000' COMMENT '商品税金',
`sales_order_amount` decimal(19,4) NOT NULL DEFAULT '0.0000' COMMENT '客户购买商品总额',
`receivables_code` varchar(20) NOT NULL COMMENT '支付方式',
`sales_order_state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '销售状态',
`sales_order_info` varchar(500) NOT NULL COMMENT '备注说明',
`return_state` tinyint(2) NOT NULL DEFAULT '0' COMMENT '退货状态',
`admin_id` int(11) NOT NULL COMMENT '操作者id',
KEY `sales_order_sn` (`sales_order_sn`),
KEY `customer_id` (`customer_id`),
KEY `customer_contacts` (`customer_contacts`),
KEY `customer_address` (`customer_address`),
KEY `customer_phone` (`customer_phone`),
KEY `customer_telephone` (`customer_telephone`),
KEY `sales_order_goods_amount` (`sales_order_goods_amount`),
KEY `sales_order_tax_amount` (`sales_order_tax_amount`),
KEY `sales_order_amount` (`sales_order_amount`),
KEY `receivables_code` (`receivables_code`),
KEY `sales_order_state` (`sales_order_state`),
KEY `sales_order_info` (`sales_order_info`),
KEY `return_state` (`return_state`),
KEY `admin_id` (`admin_id`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'DBErp进销存-销售订单';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-14 of 14 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
sales_order_sn | varchar(50) | 否 | 销售订单编号 | |||
customer_id | int(11) | 否 | 客户id | |||
customer_contacts | varchar(30) | 否 | 客户联系人 | |||
customer_address | varchar(255) | 否 | ||||
customer_phone | varchar(20) | 是 | 客户手机 | |||
customer_telephone | varchar(20) | 是 | 客户电话 | |||
sales_order_goods_amount | decimal(19,4) | 0.0000 | 否 | 客户购买商品金额 | 0.0000 | |
sales_order_tax_amount | decimal(19,4) | 0.0000 | 否 | 商品税金 | 0.0000 | |
sales_order_amount | decimal(19,4) | 0.0000 | 否 | 客户购买商品总额 | 0.0000 | |
receivables_code | varchar(20) | 否 | 支付方式 | |||
sales_order_state | tinyint(4) | 0 | 否 | 销售状态 | 0 | |
sales_order_info | varchar(500) | 是 | 备注说明 | |||
return_state | tinyint(2) | 0 | 否 | 退货状态 | 0 | |
admin_id | int(11) | 否 | 操作者id |