Está en la página 1de 4

--- Base de datos: `pretty_cash` --- ---------------------------------------------------------- Estructura de tabla para la tabla `agency` -CREATE TABLE IF NOT EXISTS

`BRANCHIE` ( ` BRANCHIE_ID` int(11) NOT NULL AUTO_INCREMENT, ` BRANCHIE_NAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', ` BRANCHIE_ADDR` varchar(200) COLLATE latin1_general_ci NOT NULL, ` BRANCHIE_TEL` varchar(10) COLLATE latin1_general_ci NOT NULL, ` BRANCHIE_MAIL` varchar(200) COLLATE latin1_general_ci NOT NULL, `FK_PLACE_ID` varchar(5) COLLATE latin1_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`AGENCY_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `badge` -CREATE TABLE IF NOT EXISTS `badge` ( `BADGE_ID` int(11) NOT NULL AUTO_INCREMENT, `DATE_BADGE` date NOT NULL DEFAULT '0000-00-00', `BADGE_VALUE` float NOT NULL, `CURRENCY_ID_A` int(11) DEFAULT NULL, `CURRENCY_ID_B` int(11) DEFAULT NULL, PRIMARY KEY (`BADGE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `catalog` -CREATE TABLE IF NOT EXISTS `catalog` ( `CATALOG_ID` int(11) NOT NULL AUTO_INCREMENT, `CATALOG_NAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`CATALOG_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `customer` --

CREATE TABLE IF NOT EXISTS `customer` ( `CUSTOMER_ID` varchar(15) COLLATE latin1_general_ci NOT NULL DEFAULT '', `CUSTOMER_FIRSTNAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `CUSTOMER_LASTNAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `CUSTOMER_ADDRESS` varchar(70) COLLATE latin1_general_ci NOT NULL DEFAULT '', `PHONE_CUSTOMER` varchar(50) COLLATE latin1_general_ci NOT NULL DEFAULT '', `DATE_BIRTH` date NOT NULL DEFAULT '0000-00-00', `EMAIL_CLIENT` varchar(50) COLLATE latin1_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`CUSTOMER_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `loan` -CREATE TABLE IF NOT EXISTS `loan` ( `LOAN_ID` int(11) NOT NULL AUTO_INCREMENT, `LOAN_VALUE` float NOT NULL, `BEGIN_DATE_LOAN` date NOT NULL DEFAULT '0000-00-00', `END_DATE_LOAN` date NOT NULL DEFAULT '0000-00-00', `FK_CUSTOMER_ID` varchar(15) COLLATE latin1_general_ci NOT NULL DEFAULT '', `FK_OFICIAL_RATE_ID` int(11) NOT NULL, PRIMARY KEY (`LOAN_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `movement` -CREATE TABLE IF NOT EXISTS `movement` ( `MOVEMENT_ID` int(11) NOT NULL AUTO_INCREMENT, `DATE_MOVEMENT` date NOT NULL DEFAULT '0000-00-00', `VALUE_PAYMENT` float NOT NULL, `FILE_MOVEMENT` varchar(200) COLLATE latin1_general_ci NOT NULL DEFAULT '', `TYPE_FILE_MOVEMENT` varchar(200) COLLATE latin1_general_ci NOT NULL DEFAULT '', `SIZE_FILE_MOVEMENT` varchar(200) COLLATE latin1_general_ci NOT NULL DEFAULT '', `NAME_FILE_MOVEMENT` varchar(200) COLLATE latin1_general_ci NOT NULL DEFAULT '', `FK_LOAN_ID` int(11) NOT NULL, `FK_CATALOG_ID` int(11) NOT NULL, PRIMARY KEY (`MOVEMENT_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `place` --

CREATE TABLE IF NOT EXISTS `place` ( `PLACE_ID` varchar(5) COLLATE latin1_general_ci NOT NULL DEFAULT '', `PLACE_NAME` varchar(40) COLLATE latin1_general_ci NOT NULL DEFAULT '', `FK_PLACE_ID` varchar(5) COLLATE latin1_general_ci DEFAULT NULL, PRIMARY KEY (`PLACE_ID`), KEY `FK_LUGAR_22_LUGAR` (`FK_PLACE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `role` -CREATE TABLE IF NOT EXISTS `role` ( `ROLE_ID` int(11) NOT NULL AUTO_INCREMENT, `ROLE_NAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`ROLE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `type_currency` -CREATE TABLE IF NOT EXISTS `OFICIAL_RATE` ( ` OFICIAL_RATE _ID` int(11) NOT NULL AUTO_INCREMENT, ` OFICIAL_RATE _COD` varchar(3) COLLATE latin1_general_ci NOT NULL DEFAULT '', ` OFICIAL_RATE _NAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`CURRENCY_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- ---------------------------------------------------------- Estructura de tabla para la tabla `user` -CREATE TABLE IF NOT EXISTS `user` ( `USER_ID` varchar(15) COLLATE latin1_general_ci NOT NULL DEFAULT '', `USER_FIRSTNAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `USER_LASTNAME` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `USER_ADDRESS` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `PHONE_USER` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `MAIL_USER` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `PASS_USER` varchar(25) COLLATE latin1_general_ci NOT NULL, `STATE_USER` char(1) COLLATE latin1_general_ci NOT NULL, `ROLE_ID` int(11) NOT NULL, `BRANCHIE_ID` int(11) NOT NULL, PRIMARY KEY (`USER_ID`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;