<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : formaspago.xml
    Author     : Carlos Garcia Gomez
    Description:
        Structure for the formaspago table.
-->
<table>
    <column>
        <name>activa</name>
        <type>boolean</type>
        <default>true</default>
    </column>
    <column>
        <name>codcuentabanco</name>
        <type>character varying(10)</type>
    </column>
    <column>
        <name>codpago</name>
        <type>character varying(10)</type>
        <null>NO</null>
    </column>
    <column>
        <name>descripcion</name>
        <type>character varying(100)</type>
        <null>NO</null>
    </column>
    <column>
        <name>domiciliado</name>
        <type>boolean</type>
    </column>
    <column>
        <name>idempresa</name>
        <type>integer</type>
    </column>
    <column>
        <name>imprimir</name>
        <type>boolean</type>
        <default>true</default>
    </column>
    <column>
        <name>pagado</name>
        <type>boolean</type>
        <default>false</default>
    </column>
    <column>
        <name>plazovencimiento</name>
        <type>integer</type>
    </column>
    <column>
        <name>tipovencimiento</name>
        <type>character varying(10)</type>
    </column>
    <constraint>
        <name>formaspago_pkey</name>
        <type>PRIMARY KEY (codpago)</type>
    </constraint>
    <constraint>
        <name>ca_formaspago_cuentasbanco</name>
        <type>FOREIGN KEY (codcuentabanco) REFERENCES cuentasbanco (codcuenta) ON DELETE SET NULL ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_formaspago_empresas</name>
        <type>FOREIGN KEY (idempresa) REFERENCES empresas (idempresa) ON DELETE CASCADE ON UPDATE CASCADE</type>
    </constraint>
</table>