<?xml version="1.0" encoding="UTF-8"?>
<table>
    <column>
        <name>creation_date</name>
        <type>timestamp</type>
        <null>NO</null>
    </column>
    <column>
        <name>end_codejercicio</name>
        <type>character varying(4)</type>
        <null>NO</null>
    </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>nick</name>
        <type>character varying(50)</type>
    </column>
    <column>
        <name>reference</name>
        <type>character varying(18)</type>
        <null>NO</null>
    </column>
    <column>
        <name>start_codejercicio</name>
        <type>character varying(4)</type>
        <null>NO</null>
    </column>
    <column>
        <name>status</name>
        <type>character varying(15)</type>
        <null>NO</null>
    </column>
    <constraint>
        <name>verifactu_requerimientos_pkey</name>
        <type>PRIMARY KEY (id)</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_requerimientos_nick</name>
        <type>FOREIGN KEY (nick) REFERENCES users (nick) ON DELETE SET NULL ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_requerimientos_empresas</name>
        <type>FOREIGN KEY (idempresa) REFERENCES empresas (idempresa) ON DELETE CASCADE ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_requerimientos_start_codejercicio</name>
        <type>FOREIGN KEY (start_codejercicio) REFERENCES ejercicios (codejercicio) ON DELETE CASCADE ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_verifactu_requerimientos_end_codejercicio</name>
        <type>FOREIGN KEY (end_codejercicio) REFERENCES ejercicios (codejercicio) ON DELETE CASCADE ON UPDATE CASCADE</type>
    </constraint>
</table>