MySQL Create Table SQL
Table Structure: okayapi_box_invoice:/tablelist/okayapi_box_invoice.html
-- MySQL Table okayapi_box_invoice
-- From: OkayAPI.com
CREATE TABLE `okayapi_box_invoice` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`client_id` bigint(20) NULL COMMENT '',
`serie` varchar(50) NULL COMMENT '',
`nr` varchar(255) NULL COMMENT '',
`hash` varchar(255) NULL COMMENT 'To access via public link',
`currency` varchar(25) NULL COMMENT '',
`currency_rate` decimal(13,6) NULL COMMENT '',
`credit` double(18,2) NULL COMMENT '',
`base_income` double(18,2) NULL COMMENT 'Income in default currency',
`base_refund` double(18,2) NULL COMMENT 'Refund in default currency',
`refund` double(18,2) NULL COMMENT '',
`notes` text NULL COMMENT '',
`text_1` text NULL COMMENT '',
`text_2` text NULL COMMENT '',
`status` varchar(50) NULL DEFAULT 'unpaid' COMMENT 'paid, unpaid',
`seller_company` varchar(255) NULL COMMENT '',
`seller_company_vat` varchar(255) NULL COMMENT '',
`seller_company_number` varchar(255) NULL COMMENT '',
`seller_address` varchar(255) NULL COMMENT '',
`seller_phone` varchar(255) NULL COMMENT '',
`seller_email` varchar(255) NULL COMMENT '',
`buyer_first_name` varchar(255) NULL COMMENT '',
`buyer_last_name` varchar(255) NULL COMMENT '',
`buyer_company` varchar(255) NULL COMMENT '',
`buyer_company_vat` varchar(255) NULL COMMENT '',
`buyer_company_number` varchar(255) NULL COMMENT '',
`buyer_address` varchar(255) NULL COMMENT '',
`buyer_city` varchar(255) NULL COMMENT '',
`buyer_state` varchar(255) NULL COMMENT '',
`buyer_country` varchar(255) NULL COMMENT '',
`buyer_zip` varchar(255) NULL COMMENT '',
`buyer_phone` varchar(255) NULL COMMENT '',
`buyer_phone_cc` varchar(255) NULL COMMENT '',
`buyer_email` varchar(255) NULL COMMENT '',
`gateway_id` int(11) NULL COMMENT '',
`approved` tinyint(1) NULL DEFAULT '0' COMMENT '',
`taxname` varchar(255) NULL COMMENT '',
`taxrate` varchar(35) NULL COMMENT '',
`due_at` datetime NULL COMMENT '',
`reminded_at` datetime NULL COMMENT '',
`paid_at` datetime NULL COMMENT '',
KEY `client_id` (`client_id`),
KEY `serie` (`serie`),
KEY `nr` (`nr`),
KEY `hash` (`hash`),
KEY `currency` (`currency`),
KEY `currency_rate` (`currency_rate`),
KEY `credit` (`credit`),
KEY `base_income` (`base_income`),
KEY `base_refund` (`base_refund`),
KEY `refund` (`refund`),
KEY `notes` (`notes`),
KEY `text_1` (`text_1`),
KEY `text_2` (`text_2`),
KEY `status` (`status`),
KEY `seller_company` (`seller_company`),
KEY `seller_company_vat` (`seller_company_vat`),
KEY `seller_company_number` (`seller_company_number`),
KEY `seller_address` (`seller_address`),
KEY `seller_phone` (`seller_phone`),
KEY `seller_email` (`seller_email`),
KEY `buyer_first_name` (`buyer_first_name`),
KEY `buyer_last_name` (`buyer_last_name`),
KEY `buyer_company` (`buyer_company`),
KEY `buyer_company_vat` (`buyer_company_vat`),
KEY `buyer_company_number` (`buyer_company_number`),
KEY `buyer_address` (`buyer_address`),
KEY `buyer_city` (`buyer_city`),
KEY `buyer_state` (`buyer_state`),
KEY `buyer_country` (`buyer_country`),
KEY `buyer_zip` (`buyer_zip`),
KEY `buyer_phone` (`buyer_phone`),
KEY `buyer_phone_cc` (`buyer_phone_cc`),
KEY `buyer_email` (`buyer_email`),
KEY `gateway_id` (`gateway_id`),
KEY `approved` (`approved`),
KEY `taxname` (`taxname`),
KEY `taxrate` (`taxrate`),
KEY `due_at` (`due_at`),
KEY `reminded_at` (`reminded_at`),
KEY `paid_at` (`paid_at`),
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-40 of 40 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
client_id | bigint(20) | 是 | Normal Index | |||
serie | varchar(50) | 是 | ||||
nr | varchar(255) | 是 | ||||
hash | varchar(255) | 是 | To access via public link | Unique Index | ||
currency | varchar(25) | 是 | ||||
currency_rate | decimal(13,6) | 是 | ||||
credit | double(18,2) | 是 | ||||
base_income | double(18,2) | 是 | Income in default currency | |||
base_refund | double(18,2) | 是 | Refund in default currency | |||
refund | double(18,2) | 是 | ||||
notes | text | 是 | ||||
text_1 | text | 是 | ||||
text_2 | text | 是 | ||||
status | varchar(50) | unpaid | 是 | paid, unpaid | unpaid | |
seller_company | varchar(255) | 是 | ||||
seller_company_vat | varchar(255) | 是 | ||||
seller_company_number | varchar(255) | 是 | ||||
seller_address | varchar(255) | 是 | ||||
seller_phone | varchar(255) | 是 | ||||
seller_email | varchar(255) | 是 | ||||
buyer_first_name | varchar(255) | 是 | ||||
buyer_last_name | varchar(255) | 是 | ||||
buyer_company | varchar(255) | 是 | ||||
buyer_company_vat | varchar(255) | 是 | ||||
buyer_company_number | varchar(255) | 是 | ||||
buyer_address | varchar(255) | 是 | ||||
buyer_city | varchar(255) | 是 | ||||
buyer_state | varchar(255) | 是 | ||||
buyer_country | varchar(255) | 是 | ||||
buyer_zip | varchar(255) | 是 | ||||
buyer_phone | varchar(255) | 是 | ||||
buyer_phone_cc | varchar(255) | 是 | ||||
buyer_email | varchar(255) | 是 | ||||
gateway_id | int(11) | 是 | ||||
approved | tinyint(1) | 0 | 是 | 0 | ||
taxname | varchar(255) | 是 | ||||
taxrate | varchar(35) | 是 | ||||
due_at | datetime | 是 | ||||
reminded_at | datetime | 是 | ||||
paid_at | datetime | 是 |