MySQL Create Table SQL
Table Structure: okayapi_travel_depots:/tablelist/okayapi_travel_depots.html
-- MySQL Table okayapi_travel_depots
-- From: OkayAPI.com
CREATE TABLE `okayapi_travel_depots` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`active` int(1) NOT NULL DEFAULT '0' COMMENT '-1作废,0不正常,1是正常',
`category_id` int(6) NOT NULL DEFAULT '0' COMMENT '分类id',
`ticket_no` varchar(100) NOT NULL COMMENT '票号',
`voucher_total` int(6) NOT NULL DEFAULT '1' COMMENT '总购买数',
`voucher_remaining` int(6) NOT NULL DEFAULT '0' COMMENT '当前剩余数',
`valid_start` datetime NOT NULL COMMENT '',
`valid_ends` datetime NOT NULL COMMENT '',
`created` bigint(12) NOT NULL DEFAULT '0' COMMENT '',
`price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '实际销售价格',
`create_from` set('www_seller','window_seller','import_depot') NOT NULL DEFAULT 'window_seller' COMMENT '票来源,入库、窗口销售、电商平台销售',
`create_from_id` int(11) NOT NULL DEFAULT '0' COMMENT '此票来源表对应的票,比如入库导入记录表、窗口销售记录表、电商平台销售记录表的ID等',
KEY `active` (`active`),
KEY `category_id` (`category_id`),
KEY `ticket_no` (`ticket_no`),
KEY `voucher_total` (`voucher_total`),
KEY `voucher_remaining` (`voucher_remaining`),
KEY `valid_start` (`valid_start`),
KEY `valid_ends` (`valid_ends`),
KEY `created` (`created`),
KEY `price` (`price`),
KEY `create_from` (`create_from`),
KEY `create_from_id` (`create_from_id`),
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-11 of 11 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
active | int(1) | 0 | 否 | -1作废,0不正常,1是正常 | 0 | |
category_id | int(6) | 0 | 否 | 分类id | Normal Index | 0 |
ticket_no | varchar(100) | 否 | 票号 | Unique Index | ||
voucher_total | int(6) | 1 | 否 | 总购买数 | 1 | |
voucher_remaining | int(6) | 0 | 否 | 当前剩余数 | 0 | |
valid_start | datetime | 否 | ||||
valid_ends | datetime | 否 | ||||
created | bigint(12) | 0 | 否 | 0 | ||
price | decimal(8,2) | 0.00 | 否 | 实际销售价格 | 0.00 | |
create_from | set('www_seller','window_seller','import_depot') | window_seller | 否 | 票来源,入库、窗口销售、电商平台销售 | window_seller | |
create_from_id | int(11) | 0 | 否 | 此票来源表对应的票,比如入库导入记录表、窗口销售记录表、电商平台销售记录表的ID等 | 0 |