<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<clay-model clay-version="2.0.0">
<database-model author="" begin-script="" end-script="" id="17671:124a13a6cd0:-8000" name="modelo_bd" sql-dialect-id="jp.azzurri.clay.dialect.HSQLDB_1_7_0_Dialect" version="1.0">
<schema-list>
<schema id="17671:124a13a6cd0:-7ffd" name="FACTURACION">
<table-list>
<table alias="Clientes" id="17671:124a13a6cd0:-7fff" name="Clientes">
<table-description>Tabla para el mantenimiento de los clientes de la empresa</table-description>
<column-list>
<column alias="Identificador" auto-increment="true" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff8" mandatory="true" name="Identificador">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="Nombre" auto-increment="false" column-size="50" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff5" mandatory="false" name="Nombre">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Direccion" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff4" mandatory="false" name="Direccion">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="Poblacion" auto-increment="false" column-size="10" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff3" mandatory="false" name="Poblacion">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="CP" auto-increment="false" column-size="10" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff2" mandatory="false" name="CP">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Provincia" auto-increment="false" column-size="50" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff1" mandatory="false" name="Provincia">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="CIF" auto-increment="false" column-size="13" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7ff0" mandatory="false" name="CIF">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Telefono" auto-increment="false" column-size="11" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7feb" mandatory="false" name="Telefono">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Fax" auto-increment="false" column-size="11" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fee" mandatory="false" name="Fax">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Activo" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fed" mandatory="false" name="Activo">
<data-type name="BIT" selected-variant-pattern="BIT"/>
</column>
</column-list>
<primary-key id="17671:124a13a6cd0:-7ffe" name="PK_CLIENTES">
<primary-key-column name="Identificador"/>
</primary-key>
</table>
<table alias="Factura" id="17671:124a13a6cd0:-7fe8" name="Factura">
<table-description>Tabla que mantiene los datos principales de la factura</table-description>
<column-list>
<column alias="Numero" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fe4" mandatory="true" name="Numero">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="Fecha" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fe3" mandatory="false" name="Fecha">
<data-type name="DATE" selected-variant-pattern="DATE"/>
</column>
<column alias="IdentificadorCliente" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fe2" mandatory="false" name="IdentificadorCliente">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="IRPF" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fe1" mandatory="false" name="IRPF">
<data-type name="DOUBLE" selected-variant-pattern="DOUBLE"/>
</column>
<column alias="Anyo" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fe0" mandatory="true" name="Anyo">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="Cobrada" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fdf" mandatory="false" name="Cobrada">
<data-type name="BIT" selected-variant-pattern="BIT"/>
</column>
<column alias="FechaCobro" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fde" mandatory="false" name="FechaCobro">
<data-type name="DATE" selected-variant-pattern="DATE"/>
</column>
<column alias="ModoPago" auto-increment="false" column-size="15" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fdd" mandatory="false" name="ModoPago">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="ImporteFactura" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fdc" mandatory="false" name="ImporteFactura">
<data-type name="DOUBLE" selected-variant-pattern="DOUBLE"/>
</column>
</column-list>
<primary-key id="17671:124a13a6cd0:-7fe7" name="PK_FACTURA">
<primary-key-column name="Numero"/>
<primary-key-column name="Anyo"/>
</primary-key>
<foreign-key-list>
<foreign-key id="17671:124a13a6cd0:-7efd" name="FK_ClienteFactura" on-delete="UNSPECIFIED" on-update="UNSPECIFIED" referenced-key="PK_CLIENTES" referenced-table="Clientes" referenced-table-schema="FACTURACION" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
<foreign-key-description>Clave ajena de Factura a Cliente</foreign-key-description>
<foreign-key-column column-name="IdentificadorCliente" referenced-key-column-name="Identificador"/>
</foreign-key>
</foreign-key-list>
</table>
<table alias="LineaFactura" id="17671:124a13a6cd0:-7fd7" name="LineaFactura">
<table-description>Tabla para el mantenimiento de los detalles de la factura</table-description>
<column-list>
<column alias="NumeroLinea" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc8" mandatory="true" name="NumeroLinea">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="NumeroFactura" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc7" mandatory="true" name="NumeroFactura">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="AnyoFactura" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc6" mandatory="true" name="AnyoFactura">
<data-type name="INT" selected-variant-pattern="INT"/>
</column>
<column alias="Cantidad" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc5" mandatory="false" name="Cantidad">
<data-type name="DOUBLE" selected-variant-pattern="DOUBLE"/>
</column>
<column alias="Descripcion" auto-increment="false" column-size="200" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc4" mandatory="false" name="Descripcion">
<data-type name="CHAR" selected-variant-pattern="CHAR(%n)"/>
</column>
<column alias="Precio" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc3" mandatory="false" name="Precio">
<data-type name="DOUBLE" selected-variant-pattern="DOUBLE"/>
</column>
<column alias="IVA" auto-increment="false" column-size="0" decimal-digits="0" default-value="" id="17671:124a13a6cd0:-7fc2" mandatory="false" name="IVA">
<data-type name="DOUBLE" selected-variant-pattern="DOUBLE"/>
</column>
</column-list>
<primary-key id="17671:124a13a6cd0:-7fd6" name="PK_LINEAFACTURA">
<primary-key-column name="NumeroLinea"/>
<primary-key-column name="NumeroFactura"/>
<primary-key-column name="AnyoFactura"/>
</primary-key>
<foreign-key-list>
<foreign-key id="17671:124a13a6cd0:-7e4a" name="FK_LineaFactura_Factura" on-delete="UNSPECIFIED" on-update="UNSPECIFIED" referenced-key="PK_FACTURA" referenced-table="Factura" referenced-table-schema="FACTURACION" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
<foreign-key-column column-name="NumeroFactura" referenced-key-column-name="Numero"/>
<foreign-key-column column-name="AnyoFactura" referenced-key-column-name="Anyo"/>
</foreign-key>
</foreign-key-list>
</table>
</table-list>
</schema>
</schema-list>
</database-model>
<diagram>
<table-figure height="202" refid="17671:124a13a6cd0:-7fff" width="166" x="11" y="14"/>
<table-figure height="181" refid="17671:124a13a6cd0:-7fe8" width="159" x="262" y="13"/>
<table-figure height="174" refid="17671:124a13a6cd0:-7fd7" width="242" x="462" y="219"/>
</diagram>
</clay-model>
