<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : agentes.xml
    Author     : Carlos Garcia Gomez
    Description:
        Structure for the agentes table.
-->
<table>
    <column>
        <name>cargo</name>
        <type>character varying(100)</type>
    </column>
    <column>
        <name>cifnif</name>
        <type>character varying(30)</type>
    </column>
    <column>
        <name>codagente</name>
        <type>character varying(10)</type>
        <null>NO</null>
    </column>
    <column>
        <name>debaja</name>
        <type>boolean</type>
        <default>false</default>
    </column>
    <column>
        <name>email</name>
        <type>character varying(100)</type>
    </column>
    <column>
        <name>fechaalta</name>
        <type>date</type>
    </column>
    <column>
        <name>fechabaja</name>
        <type>date</type>
    </column>
    <column>
        <name>idcontacto</name>
        <type>integer</type>
    </column>
    <column>
        <name>idproducto</name>
        <type>integer</type>
    </column>
    <column>
        <name>nombre</name>
        <type>character varying(100)</type>
        <null>NO</null>
    </column>
    <column>
        <name>observaciones</name>
        <type>text</type>
    </column>
    <column>
        <name>telefono1</name>
        <type>character varying(30)</type>
    </column>
    <column>
        <name>telefono2</name>
        <type>character varying(30)</type>
    </column>
    <column>
        <name>tipoidfiscal</name>
        <type>character varying(25)</type>
    </column>
    <constraint>
        <name>agentes_pkey</name>
        <type>PRIMARY KEY (codagente)</type>
    </constraint>
    <constraint>
        <name>ca_agentes_productos</name>
        <type>FOREIGN KEY (idproducto) REFERENCES productos (idproducto) ON DELETE SET NULL ON UPDATE CASCADE</type>
    </constraint>
</table>
