47 lines
1.8 KiB
SQL
47 lines
1.8 KiB
SQL
CREATE TABLE `Building` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`network_id` int(11) NOT NULL,
|
|
`pop_id` int(11) NOT NULL,
|
|
`type_id` int(11) NOT NULL,
|
|
`status_id` int(11) NOT NULL,
|
|
`pipeworker_id` int(11) DEFAULT NULL,
|
|
`code` varchar(16) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`oan_id` varchar(8) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`street` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`zip` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`city` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`gps_lat` decimal(15,10) NOT NULL,
|
|
`gps_long` decimal(15,10) NOT NULL,
|
|
`contact` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`phone` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`email` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`units` int(11) NOT NULL,
|
|
`description` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`note` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`create_by` int(11) NOT NULL,
|
|
`edit_by` int(11) NOT NULL,
|
|
`create` int(11) NOT NULL,
|
|
`edit` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
|
|
|
CREATE TABLE `Buildingstatus` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`code` int(11) NOT NULL,
|
|
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`create_by` int(11) NOT NULL,
|
|
`edit_by` int(11) NOT NULL,
|
|
`create` int(11) NOT NULL,
|
|
`edit` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
|
|
|
CREATE TABLE `Buildingtype` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
|
`create_by` int(11) NOT NULL,
|
|
`edit_by` int(11) NOT NULL,
|
|
`create` int(11) NOT NULL,
|
|
`edit` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; |