-
Notifications
You must be signed in to change notification settings - Fork 0
/
FasterXML_jackson-datatype-hibernate.sql
11 lines (11 loc) · 2.86 KB
/
FasterXML_jackson-datatype-hibernate.sql
1
2
3
4
5
6
7
8
9
10
11
select c from Customer c
CREATE TABLE `classicmodels`.`OrderDetail` ( `orderNumber` int(11) NOT NULL, `productCode` varchar(50) NOT NULL, `quantityOrdered` int(11) NOT NULL, `priceEach` double NOT NULL, `orderLineNumber` smallint(6) NOT NULL, PRIMARY KEY (`orderNumber`,`productCode`))
CREATE TABLE `classicmodels`.`Contrato` ( `id` numeric(10) NOT NULL, `numero_contrato` varchar(50) NOT NULL, PRIMARY KEY (`id`))
CREATE TABLE `classicmodels`.`Order` ( `orderNumber` int(11) NOT NULL, `orderDate` datetime NOT NULL, `requiredDate` datetime NOT NULL, `shippedDate` datetime DEFAULT NULL, `status` varchar(15) NOT NULL, `comments` text, `customerNumber` int(11) NOT NULL, PRIMARY KEY (`orderNumber`))
CREATE TABLE `classicmodels`.`Liquidacao` ( `id` numeric(10) NOT NULL, `valor_total` numeric(10) NOT NULL, `contrato_id` numeric(10) NOT NULL, `parcela_id` numeric(10) NULL, PRIMARY KEY (`id`))
CREATE TABLE `classicmodels`.`Parcela` ( `id` numeric(10) NOT NULL, `numero_parcela` numeric(10) NOT NULL, `contrato_id` numeric(10) NOT NULL, PRIMARY KEY (`id`))
CREATE TABLE `classicmodels`.`Employee` ( `employeeNumber` int(11) NOT NULL, `lastName` varchar(50) NOT NULL, `firstName` varchar(50) NOT NULL, `extension` varchar(10) NOT NULL, `email` varchar(100) NOT NULL, `officeCode` varchar(50) NOT NULL, `reportsTo` int(11) DEFAULT NULL, `jobTitle` varchar(50) NOT NULL, PRIMARY KEY (`employeeNumber`))
CREATE TABLE `classicmodels`.`Payment` ( `customerNumber` int(11) NOT NULL, `checkNumber` varchar(50) NOT NULL, `paymentDate` datetime NOT NULL, `amount` double NOT NULL, PRIMARY KEY (`customerNumber`,`checkNumber`))
CREATE TABLE `classicmodels`.`Product` ( `productCode` varchar(50) NOT NULL, `productName` varchar(70) NOT NULL, `productLine` varchar(50) NOT NULL, `productScale` varchar(10) NOT NULL, `productVendor` varchar(50) NOT NULL, `productDescription` text NOT NULL, `quantityInStock` smallint(6) NOT NULL, `buyPrice` double NOT NULL, `MSRP` double NOT NULL, PRIMARY KEY (`productCode`))
CREATE TABLE `classicmodels`.`Office` ( `officeCode` varchar(50) NOT NULL, `city` varchar(50) NOT NULL, `phone` varchar(50) NOT NULL, `addressLine1` varchar(50) NOT NULL, `addressLine2` varchar(50) DEFAULT NULL, `state` varchar(50) DEFAULT NULL, `country` varchar(50) NOT NULL, `postalCode` varchar(10) NOT NULL, `territory` varchar(10) NOT NULL, PRIMARY KEY (`officeCode`))
CREATE TABLE `classicmodels`.`Customer` ( `customerNumber` int(11) NOT NULL, `customerName` varchar(50) NOT NULL, `contactLastName` varchar(50) NOT NULL, `contactFirstName` varchar(50) NOT NULL, `phone` varchar(50) NOT NULL, `addressLine1` varchar(50) NOT NULL, `addressLine2` varchar(50) DEFAULT NULL, `city` varchar(50) NOT NULL, `state` varchar(50) DEFAULT NULL, `postalCode` varchar(15) DEFAULT NULL, `country` varchar(50) NOT NULL, `salesRepEmployeeNumber` int(11) DEFAULT NULL, `creditLimit` double DEFAULT NULL, PRIMARY KEY (`customerNumber`))