<?xml version="1.0" encoding="UTF-8"?>
<table>
    <column>
        <name>codejercicio</name>
        <type>character varying(4)</type>
        <null>NO</null>
    </column>
    <column>
        <name>creation_date</name>
        <type>timestamp</type>
        <null>NO</null>
    </column>
    <column>
        <name>event</name>
        <type>character varying(15)</type>
    </column>
    <column>
        <name>file_json</name>
        <type>character varying(200)</type>
    </column>
    <column>
        <name>hash</name>
        <type>character varying(100)</type>
    </column>
    <column>
        <name>id</name>
        <type>serial</type>
        <null>NO</null>
    </column>
    <column>
        <name>idempresa</name>
        <type>integer</type>
        <null>NO</null>
    </column>
    <column>
        <name>idfactura</name>
        <type>integer</type>
        <null>NO</null>
    </column>
    <column>
        <name>mode</name>
        <type>character varying(15)</type>
        <null>NO</null>
    </column>
    <column>
        <name>nick</name>
        <type>character varying(50)</type>
    </column>
    <column>
        <name>response</name>
        <type>text</type>
    </column>
    <column>
        <name>signature</name>
        <type>boolean</type>
        <default>false</default>
    </column>
    <column>
        <name>status</name>
        <type>character varying(50)</type>
    </column>
    <constraint>
        <name>verifactu_registros_facturas_pkey</name>
        <type>PRIMARY KEY (id)</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_registros_facturas_empresas</name>
        <type>FOREIGN KEY (idempresa) REFERENCES empresas (idempresa) ON DELETE RESTRICT ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_registros_facturas_facturascli</name>
        <type>FOREIGN KEY (idfactura) REFERENCES facturascli (idfactura) ON DELETE RESTRICT ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_registros_facturas_nick</name>
        <type>FOREIGN KEY (nick) REFERENCES users (nick) ON DELETE SET NULL ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_registros_facturas_ejercicios</name>
        <type>FOREIGN KEY (codejercicio) REFERENCES ejercicios (codejercicio) ON DELETE RESTRICT ON UPDATE CASCADE</type>
    </constraint>
</table>