
-- aseguradoradb.typerole definition

CREATE TABLE `typerole` (
  `idtyperole` int NOT NULL AUTO_INCREMENT,
  `typeroleDesc` varchar(45) NOT NULL,
  PRIMARY KEY (`idtyperole`)
) ENGINE=InnoDB AUTO_INCREMENT=4 ;



-- aseguradoradb.statuscertificate definition

CREATE TABLE `statuscertificate` (
  `idstatusCertificate` int NOT NULL AUTO_INCREMENT,
  `statusCertificateDesc` varchar(45) NOT NULL,
  PRIMARY KEY (`idstatusCertificate`)
) ENGINE=InnoDB AUTO_INCREMENT=5 ;


-- aseguradoradb.typeactivities definition

CREATE TABLE `typeactivities` (
  `idtypeActivities` int NOT NULL AUTO_INCREMENT,
  `typeActivitiesDesc` varchar(500) NOT NULL,
  PRIMARY KEY (`idtypeActivities`)
) ENGINE=InnoDB AUTO_INCREMENT=6 ;


-- aseguradoradb.typemoney definition

CREATE TABLE `typemoney` (
  `idtypeMoney` int NOT NULL AUTO_INCREMENT,
  `typeMoneyDesc` varchar(45) NOT NULL,
  PRIMARY KEY (`idtypeMoney`)
) ENGINE=InnoDB AUTO_INCREMENT=3 ;


-- aseguradoradb.typepolice definition

CREATE TABLE `typepolice` (
  `idtypePolice` int NOT NULL AUTO_INCREMENT,
  `typePoliceDesc` varchar(45) NOT NULL,
  PRIMARY KEY (`idtypePolice`)
) ENGINE=InnoDB AUTO_INCREMENT=3 ;



-- aseguradoradb.`user` definition

CREATE TABLE `user` (
  `iduser` int NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `password` varchar(1000) NOT NULL,
  `email` varchar(75) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `phone` varchar(45) DEFAULT NULL,
  `remember_token` varchar(500) DEFAULT NULL,
  `disable` int NOT NULL,
  `typerole_idtyperole` int NOT NULL,
  `token` varchar(500) DEFAULT NULL,
  `client_id` int DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `countrycode` varchar(100) DEFAULT NULL,
  `company` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`iduser`),
  KEY `fk_user_typerole_idx` (`typerole_idtyperole`),
  KEY `FK_client_user_idx` (`client_id`)
) ENGINE=InnoDB AUTO_INCREMENT=83 ;

-- aseguradoradb.client definition

CREATE TABLE `client` (
  `idclient` int NOT NULL AUTO_INCREMENT,
  `clientName` varchar(200) NOT NULL,
  `clientNit` varchar(45) DEFAULT NULL,
  `clientAddress` varchar(500) NOT NULL,
  `clientPhone` varchar(45) NOT NULL,
  `clientDisable` int DEFAULT '1',
  `clientLogo` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`idclient`)
) ENGINE=InnoDB AUTO_INCREMENT=39 ;


-- aseguradoradb.failed_jobs definition

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.insurance definition

CREATE TABLE `insurance` (
  `idinsurance` int NOT NULL AUTO_INCREMENT,
  `insuranceName` varchar(500) NOT NULL,
  `insuranceAddress` varchar(500) DEFAULT NULL,
  `insuranceEmail` varchar(75) NOT NULL,
  `insurancePhone` varchar(45) NOT NULL,
  `insuranceFax` varchar(500) DEFAULT NULL,
  `insuraceNit` varchar(45) DEFAULT NULL,
  `insuranceAgent` varchar(500) DEFAULT NULL,
  `insuranceLogo` varchar(500) NOT NULL,
  `insuranceSignature` varchar(500) NOT NULL,
  `insuranceOffice` varchar(450) DEFAULT NULL,
  `insuranceInter` varchar(450) DEFAULT NULL,
  `insuranceDisable` int DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`idinsurance`)
) ENGINE=InnoDB AUTO_INCREMENT=15 ;


-- aseguradoradb.managerassignment definition

CREATE TABLE `managerassignment` (
  `user_iduser` int NOT NULL,
  `client_idclient` int NOT NULL,
  `managerassignmentId` int NOT NULL AUTO_INCREMENT,
  `updated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`managerassignmentId`),
  KEY `fk_user_has_client_client1_idx` (`client_idclient`),
  KEY `fk_user_has_client_user1_idx` (`user_iduser`)
) ENGINE=InnoDB AUTO_INCREMENT=21 ;


-- aseguradoradb.migrations definition

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.oauth_access_tokens definition

CREATE TABLE `oauth_access_tokens` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `client_id` bigint unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci,
  `revoked` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_access_tokens_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.oauth_auth_codes definition

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned NOT NULL,
  `client_id` bigint unsigned NOT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_auth_codes_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.oauth_clients definition

CREATE TABLE `oauth_clients` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `secret` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provider` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `personal_access_client` tinyint(1) NOT NULL,
  `password_client` tinyint(1) NOT NULL,
  `revoked` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_clients_user_id_index` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.oauth_personal_access_clients definition

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `client_id` bigint unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.oauth_refresh_tokens definition

CREATE TABLE `oauth_refresh_tokens` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.password_resets definition

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.personal_access_tokens definition

CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





-- aseguradoradb.users definition

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- aseguradoradb.logactivities definition

CREATE TABLE `logactivities` (
  `idLogActivities` int NOT NULL AUTO_INCREMENT,
  `DateLog` timestamp NULL DEFAULT NULL,
  `description` varchar(500) NOT NULL,
  `typeActivities_idtypeActivities` int NOT NULL,
  `user_iduser` int NOT NULL,
  PRIMARY KEY (`idLogActivities`),
  KEY `fk_LogActivities_typeActivities1_idx` (`typeActivities_idtypeActivities`),
  KEY `fk_LogActivities_user1_idx` (`user_iduser`),
  CONSTRAINT `fk_LogActivities_typeActivities1` FOREIGN KEY (`typeActivities_idtypeActivities`) REFERENCES `typeactivities` (`idtypeActivities`),
  CONSTRAINT `fk_LogActivities_user1` FOREIGN KEY (`user_iduser`) REFERENCES `user` (`iduser`)
) ENGINE=InnoDB AUTO_INCREMENT=1945 ;


-- aseguradoradb.policy definition

CREATE TABLE `policy` (
  `idpolicy` int NOT NULL AUTO_INCREMENT,
  `policyAmount` decimal(10,0) NOT NULL,
  `dateCreate` date NOT NULL,
  `dateCurrencyStart` date NOT NULL,
  `dateCurrencyEnd` date NOT NULL,
  `posessionInsured` varchar(2500) DEFAULT NULL,
  `possesionExcluded` varchar(2500) DEFAULT NULL,
  `coverType` varchar(2500) DEFAULT NULL,
  `deductibleDamage` int NOT NULL,
  `deductibleTheft` int NOT NULL,
  `deductibleDamageMinimum` decimal(10,2) NOT NULL,
  `deductibleTheftMinimum` decimal(10,2) NOT NULL,
  `insurance_idinsurance` int NOT NULL,
  `client_idclient` int NOT NULL,
  `typePolice_idtypePolice` int NOT NULL,
  `policyCode` varchar(50) DEFAULT NULL,
  `valuationBasePolicy` int DEFAULT NULL,
  `originStatedPolicy` varchar(500) DEFAULT NULL,
  `destinationStatedPolicy` varchar(500) DEFAULT NULL,
  `authWays` varchar(100) DEFAULT NULL,
  `internalTransportation` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `policyDisablepolicy` tinyint DEFAULT '1',
  `typeMoney` int NOT NULL DEFAULT '1',
  `importExportRate` decimal(10,2) NOT NULL,
  `internalTransport` decimal(10,2) NOT NULL,
  `deductibleFranquise` decimal(10,2) NOT NULL,
  `observations` varchar(2500) DEFAULT NULL,
  `internalNormalDeductible` decimal(10,2) DEFAULT NULL,
  `deductibleTheftNoMeasures` decimal(10,2) DEFAULT NULL,
  `deductibleTheftNoMeasuresMinimum` decimal(10,2) DEFAULT NULL,
  `internalNormalDeductibleMinimum` decimal(10,2) DEFAULT NULL,
  `deductibleDamageTransport` decimal(10,2) DEFAULT NULL,
  `deductibleDamageTransportMinimum` decimal(10,2) DEFAULT NULL,
  `deductibleTheftTransport` decimal(10,2) DEFAULT NULL,
  `deductibleTheftTransportMinimum` decimal(10,2) DEFAULT NULL,
  `deductibleTheftTransportNoMeasure` decimal(10,2) DEFAULT NULL,
  `deductibleTheftTransportNoMeasureMinimum` decimal(10,2) DEFAULT NULL,
  `deductibleDamageFranquise` decimal(10,2) DEFAULT NULL,
  `deductibleDamageFranquiseMinimum` decimal(10,2) DEFAULT NULL,
  `internalTransportRateMinor` decimal(10,2) DEFAULT NULL,
  `statusPolicy` varchar(45) DEFAULT 'ACTIVO',
  `transportInternalmayor` decimal(10,2) DEFAULT NULL,
  `transportInternalMinor` decimal(10,2) DEFAULT NULL,
  `depositPreimium` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`idpolicy`),
  KEY `fk_policy_insurance1_idx` (`insurance_idinsurance`),
  KEY `fk_policy_client1_idx` (`client_idclient`),
  KEY `fk_policy_typePolice1_idx` (`typePolice_idtypePolice`),
  KEY `FK_typeMoney_idx` (`typeMoney`),
  CONSTRAINT `fk_policy_client1` FOREIGN KEY (`client_idclient`) REFERENCES `client` (`idclient`),
  CONSTRAINT `fk_policy_insurance1` FOREIGN KEY (`insurance_idinsurance`) REFERENCES `insurance` (`idinsurance`),
  CONSTRAINT `fk_policy_typePolice1` FOREIGN KEY (`typePolice_idtypePolice`) REFERENCES `typepolice` (`idtypePolice`),
  CONSTRAINT `FK_typeMoney` FOREIGN KEY (`typeMoney`) REFERENCES `typemoney` (`idtypeMoney`)
) ENGINE=InnoDB AUTO_INCREMENT=34 ;


-- aseguradoradb.quotecertificate definition

CREATE TABLE `quotecertificate` (
  `idtransportCertificate` int NOT NULL AUTO_INCREMENT,
  `dateRequest` date NOT NULL,
  `merchandiseType` varchar(500) NOT NULL,
  `noRef` int DEFAULT NULL,
  `invoiceNo` varchar(100) DEFAULT NULL,
  `blHwbCp` varchar(500) NOT NULL,
  `via` varchar(150) NOT NULL,
  `shipping` decimal(10,0) NOT NULL,
  `verifiableExpenses` decimal(10,0) NOT NULL,
  `total` decimal(10,0) NOT NULL,
  `normalDeductible` decimal(10,0) DEFAULT NULL,
  `franchiseDeductible` decimal(10,0) DEFAULT NULL,
  `internalNormalDeductible` decimal(10,0) DEFAULT NULL,
  `internalFranchiseDeductible` decimal(10,0) DEFAULT NULL,
  `cover` varchar(1000) DEFAULT NULL,
  `observationsCertificate` text,
  `policy_idpolicy` int NOT NULL,
  `client_idclient` int NOT NULL,
  `statusCertificate_idstatusCertificate` int NOT NULL,
  `originCountry` varchar(100) DEFAULT NULL,
  `originAddress` varchar(500) DEFAULT NULL,
  `destinationCountry` varchar(100) DEFAULT NULL,
  `destinationAddress` varchar(500) DEFAULT NULL,
  `beneficiaryName` varchar(100) DEFAULT NULL,
  `shippingNumber` varchar(50) DEFAULT NULL,
  `merchandiseDescription` text,
  `insuredOrigin` varchar(10) DEFAULT NULL,
  `propertyUnderrLiability` varchar(10) DEFAULT NULL,
  `valuationBase` decimal(10,2) DEFAULT NULL,
  `invoiceValue` varchar(500) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `certificateDisable` tinyint DEFAULT '1',
  `notes` text,
  `typeMovement` varchar(500) DEFAULT NULL,
  `applicableSecurityMeasures` text,
  `dateVigencyStart` date DEFAULT NULL,
  `dateVigencyEnd` date DEFAULT NULL,
  `noReference` varchar(100) DEFAULT NULL,
  `destinationObservation` text,
  `iduser` int DEFAULT NULL,
  `correlativeNumber` int DEFAULT NULL,
  `bamCost` decimal(10,2) DEFAULT NULL,
  `clientCost` decimal(10,2) DEFAULT NULL,
  `safetyMeasure` varchar(900) DEFAULT NULL,
  `idCertificate` varchar(900) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `countrycode` varchar(100) DEFAULT NULL,
  `company` varchar(400) DEFAULT NULL,
  `typeEmbark` varchar(100) DEFAULT NULL,
  `transporter` text,
  `typeService` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`idtransportCertificate`),
  KEY `fk_transportCertificate_policy1_idx` (`policy_idpolicy`),
  KEY `fk_transportCertificate_client1_idx` (`client_idclient`),
  KEY `fk_transportCertificate_statusCertificate1_idx` (`statusCertificate_idstatusCertificate`),
  KEY `FK_TRANSPORTUSERID_idx` (`iduser`),
  CONSTRAINT `fk_transportCertificate_client2` FOREIGN KEY (`client_idclient`) REFERENCES `client` (`idclient`),
  CONSTRAINT `fk_transportCertificate_policy2` FOREIGN KEY (`policy_idpolicy`) REFERENCES `policy` (`idpolicy`),
  CONSTRAINT `fk_transportCertificate_statusCertificate2` FOREIGN KEY (`statusCertificate_idstatusCertificate`) REFERENCES `statuscertificate` (`idstatusCertificate`),
  CONSTRAINT `FK_TRANSPORTUSERID1` FOREIGN KEY (`iduser`) REFERENCES `user` (`iduser`)
) ENGINE=InnoDB AUTO_INCREMENT=82 ;


-- aseguradoradb.transportcertificate definition

CREATE TABLE `transportcertificate` (
  `idtransportCertificate` int NOT NULL AUTO_INCREMENT,
  `dateRequest` date NOT NULL,
  `merchandiseType` varchar(500) NOT NULL,
  `noRef` int DEFAULT NULL,
  `invoiceNo` text,
  `blHwbCp` varchar(500) NOT NULL,
  `via` varchar(150) NOT NULL,
  `shipping` decimal(10,0) NOT NULL,
  `verifiableExpenses` decimal(10,0) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `normalDeductible` decimal(10,0) DEFAULT NULL,
  `franchiseDeductible` decimal(10,0) DEFAULT NULL,
  `internalNormalDeductible` decimal(10,0) DEFAULT NULL,
  `internalFranchiseDeductible` decimal(10,0) DEFAULT NULL,
  `cover` varchar(1000) DEFAULT NULL,
  `observationsCertificate` text,
  `policy_idpolicy` int NOT NULL,
  `client_idclient` int NOT NULL,
  `statusCertificate_idstatusCertificate` int NOT NULL,
  `originCountry` varchar(100) DEFAULT NULL,
  `originAddress` varchar(500) DEFAULT NULL,
  `destinationCountry` varchar(100) DEFAULT NULL,
  `destinationAddress` varchar(500) DEFAULT NULL,
  `beneficiaryName` varchar(100) DEFAULT NULL,
  `shippingNumber` varchar(50) DEFAULT NULL,
  `merchandiseDescription` text,
  `insuredOrigin` varchar(10) DEFAULT NULL,
  `propertyUnderrLiability` varchar(10) DEFAULT NULL,
  `valuationBase` varchar(500) DEFAULT NULL,
  `invoiceValue` varchar(500) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `certificateDisable` tinyint DEFAULT '1',
  `notes` text,
  `typeMovement` varchar(500) DEFAULT NULL,
  `applicableSecurityMeasures` text,
  `dateVigencyStart` date DEFAULT NULL,
  `dateVigencyEnd` date DEFAULT NULL,
  `noReference` varchar(100) DEFAULT NULL,
  `destinationObservation` text,
  `iduser` int DEFAULT NULL,
  `correlativeNumber` int DEFAULT NULL,
  `depositPremiumBefore` decimal(10,2) DEFAULT NULL,
  `depositPreimiumAfter` decimal(10,2) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `countrycode` varchar(100) DEFAULT NULL,
  `company` varchar(400) DEFAULT NULL,
  `typeEmbark` varchar(100) DEFAULT NULL,
  `transporter` text,
  `typeService` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`idtransportCertificate`),
  KEY `fk_transportCertificate_policy1_idx` (`policy_idpolicy`),
  KEY `fk_transportCertificate_client1_idx` (`client_idclient`),
  KEY `fk_transportCertificate_statusCertificate1_idx` (`statusCertificate_idstatusCertificate`),
  KEY `FK_TRANSPORTUSERID_idx` (`iduser`),
  CONSTRAINT `fk_transportCertificate_client1` FOREIGN KEY (`client_idclient`) REFERENCES `client` (`idclient`),
  CONSTRAINT `fk_transportCertificate_policy1` FOREIGN KEY (`policy_idpolicy`) REFERENCES `policy` (`idpolicy`),
  CONSTRAINT `fk_transportCertificate_statusCertificate1` FOREIGN KEY (`statusCertificate_idstatusCertificate`) REFERENCES `statuscertificate` (`idstatusCertificate`),
  CONSTRAINT `FK_TRANSPORTUSERID` FOREIGN KEY (`iduser`) REFERENCES `user` (`iduser`)
) ENGINE=InnoDB AUTO_INCREMENT=667 ;