<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="stoq_schema" schema="public" type="PostgreSQL - 9.3.13">
   <tables>
      <table name="account" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="parent_id" foreignKey="account_parent_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
            <child column="account_id" foreignKey="account_transaction_account_id_fkey" implied="false" onDeleteCascade="false" table="account_transaction"/>
            <child column="source_account_id" foreignKey="account_transaction_source_account_id_fkey" implied="false" onDeleteCascade="false" table="account_transaction"/>
            <child column="account_id" foreignKey="bank_account_account_id_fkey" implied="false" onDeleteCascade="false" table="bank_account"/>
            <child column="destination_account_id" foreignKey="payment_method_destination_account_id_fkey" implied="false" onDeleteCascade="false" table="payment_method"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="account_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="account_type" nullable="false" remarks="" size="2147483647" type="account_type"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="parent_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="account_parent_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="station_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="account_station_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="account_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="account_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="account_transaction" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="account_transaction_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="4" name="value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="source_account_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="account_transaction_source_account_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="account_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="account_transaction_account_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
         </column>
         <column autoUpdated="false" digits="6" id="7" name="date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="8" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="account_transaction_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="operation_type" nullable="false" remarks="" size="2147483647" type="account_transaction_operation_type"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="account_transaction_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="account_transaction_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="address" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="address_id" foreignKey="delivery_address_id_fkey" implied="false" onDeleteCascade="false" table="delivery"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="address_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="street" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="streetnumber" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="district" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="postal_code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="complement" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="is_main_address" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="8" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="address_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="city_location_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="address_city_location_id_fkey" implied="false" onDeleteCascade="false" table="city_location"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="address_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="address_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="attachment" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="attachment_id" foreignKey="payment_attachment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="attachment_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="mimetype" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="blob" nullable="true" remarks="" size="2147483647" type="bytea"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="attachment_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="attachment_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="bank_account" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="bank_account_id" foreignKey="bill_option_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="bill_option"/>
            <child column="bank_account_id" foreignKey="check_data_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="check_data"/>
            <child column="bank_account_id" foreignKey="employee_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="bank_account_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="bank_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="bank_branch" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="bank_account" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="bank_type" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="bank_account_account_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="bank_account_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bank_account_account_id_key" unique="true">
            <column ascending="true" name="account_id"/>
         </index>
         <index name="bank_account_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="bill_option" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="bill_option_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="option" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="bank_account_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="bill_option_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="bank_account"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="bill_option_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bill_option_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="branch" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="branch_id" foreignKey="branch_station_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
            <child column="branch_id" foreignKey="branch_synchronization_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch_synchronization"/>
            <child column="branch_id" foreignKey="employee_branch_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
            <child column="branch_id" foreignKey="fiscal_book_entry_branch_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_book_entry"/>
            <child column="branch_id" foreignKey="inventory_branch_id_fkey" implied="false" onDeleteCascade="false" table="inventory"/>
            <child column="branch_id" foreignKey="invoice_branch_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
            <child column="branch_id" foreignKey="loan_branch_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="branch_id" foreignKey="payment_branch_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
            <child column="branch_id" foreignKey="payment_renegotiation_branch_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
            <child column="branch_id" foreignKey="product_history_branch_id_fkey" implied="false" onDeleteCascade="false" table="product_history"/>
            <child column="branch_id" foreignKey="product_stock_item_branch_id_fkey" implied="false" onDeleteCascade="false" table="product_stock_item"/>
            <child column="branch_id" foreignKey="production_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
            <child column="branch_id" foreignKey="purchase_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="branch_id" foreignKey="quotation_branch_id_fkey" implied="false" onDeleteCascade="false" table="quotation"/>
            <child column="branch_id" foreignKey="quote_group_branch_id_fkey" implied="false" onDeleteCascade="false" table="quote_group"/>
            <child column="branch_id" foreignKey="receiving_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
            <child column="branch_id" foreignKey="returned_sale_branch_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="branch_id" foreignKey="sale_branch_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="branch_id" foreignKey="stock_decrease_branch_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="branch_id" foreignKey="stock_transaction_history_branch_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
            <child column="branch_id" foreignKey="till_entry_branch_id_fkey" implied="false" onDeleteCascade="false" table="till_entry"/>
            <child column="destination_branch_id" foreignKey="transfer_order_destination_branch_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="source_branch_id" foreignKey="transfer_order_source_branch_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="branch_id" foreignKey="user_branch_access_branch_id_fkey" implied="false" onDeleteCascade="false" table="user_branch_access"/>
            <child column="branch_id" foreignKey="work_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="current_branch_id" foreignKey="work_order_current_branch_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="execution_branch_id" foreignKey="work_order_execution_branch_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="destination_branch_id" foreignKey="work_order_package_destination_branch_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
            <child column="source_branch_id" foreignKey="work_order_package_source_branch_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="branch_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="manager_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="branch_manager_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="crt" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="acronym" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="branch_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="7" name="can_execute_foreign_work_orders" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="branch_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="branch_acronym_key" unique="true">
            <column ascending="true" name="acronym"/>
         </index>
         <index name="branch_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="branch_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="branch_station" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="station_id" foreignKey="account_station_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
            <child column="station_id" foreignKey="device_settings_station_id_fkey" implied="false" onDeleteCascade="false" table="device_settings"/>
            <child column="station_id" foreignKey="fiscal_day_history_station_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_day_history"/>
            <child column="station_id" foreignKey="invoice_printer_station_id_fkey" implied="false" onDeleteCascade="false" table="invoice_printer"/>
            <child column="station_id" foreignKey="till_station_id_fkey" implied="false" onDeleteCascade="false" table="till"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="branch_station_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="4" name="branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="branch_station_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="branch_station_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="branch_station_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="branch_station_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="branch_synchronization" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('branch_synchronization_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="bigserial"/>
         <column autoUpdated="false" digits="6" id="1" name="sync_time" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="2" name="policy" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="branch_synchronization_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="branch_synchronization_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="calls" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="calls_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="3" name="message" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="calls_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="attendant_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="calls_attendant_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="calls_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="calls_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="card_operation_cost" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="card_operation_cost_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="device_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="card_operation_cost_device_id_fkey" implied="false" onDeleteCascade="false" table="card_payment_device"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="provider_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="card_operation_cost_provider_id_fkey" implied="false" onDeleteCascade="false" table="credit_provider"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="card_type" nullable="false" remarks="" size="2147483647" type="credit_card_type"/>
         <column autoUpdated="false" digits="0" id="5" name="installment_start" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="installment_end" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="payment_days" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="8" name="fee" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="9" name="fare" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="card_operation_cost_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="card_operation_cost_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="card_payment_device" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="device_id" foreignKey="card_operation_cost_device_id_fkey" implied="false" onDeleteCascade="false" table="card_operation_cost"/>
            <child column="device_id" foreignKey="credit_card_data_device_id_fkey" implied="false" onDeleteCascade="false" table="credit_card_data"/>
            <child column="default_device_id" foreignKey="credit_provider_default_device_id_fkey" implied="false" onDeleteCascade="false" table="credit_provider"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="card_payment_device_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="2" id="2" name="monthly_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="card_payment_device_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="card_payment_device_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="cfop_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="cfop_id" foreignKey="fiscal_book_entry_cfop_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_book_entry"/>
            <child column="cfop_data_id" foreignKey="inventory_item_cfop_data_id_fkey" implied="false" onDeleteCascade="false" table="inventory_item"/>
            <child column="cfop_id" foreignKey="receiving_order_cfop_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
            <child column="cfop_id" foreignKey="sale_cfop_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="cfop_id" foreignKey="sale_item_cfop_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="default_sale_cfop_id" foreignKey="sellable_default_sale_cfop_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
            <child column="cfop_id" foreignKey="stock_decrease_cfop_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="cfop_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="cfop_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cfop_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="check_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="check_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="check_data_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="bank_account_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="check_data_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="bank_account"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="check_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="check_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="city_location" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('city_location_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="bigserial">
            <child column="city_location_id" foreignKey="address_city_location_id_fkey" implied="false" onDeleteCascade="false" table="address"/>
            <child column="birth_location_id" foreignKey="individual_birth_location_id_fkey" implied="false" onDeleteCascade="false" table="individual"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="country" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="city" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="state" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="city_code" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="state_code" nullable="true" remarks="" size="10" type="int4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="city_location_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="city_location_country_state_city_key" unique="true">
            <column ascending="true" name="country"/>
            <column ascending="true" name="state"/>
            <column ascending="true" name="city"/>
         </index>
      </table>
      <table name="client" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="client_id" foreignKey="client_salary_history_client_id_fkey" implied="false" onDeleteCascade="false" table="client_salary_history"/>
            <child column="client_id" foreignKey="credit_check_history_client_id_fkey" implied="false" onDeleteCascade="false" table="credit_check_history"/>
            <child column="client_id" foreignKey="loan_client_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="client_id" foreignKey="payment_renegotiation_client_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
            <child column="client_id" foreignKey="sale_client_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="client_id" foreignKey="work_order_client_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="client_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="status" nullable="false" remarks="" size="2147483647" type="client_status"/>
         <column autoUpdated="false" digits="0" id="3" name="days_late" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="4" name="credit_limit" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="5" name="salary" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="6" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_category_id_fkey" implied="false" onDeleteCascade="false" table="client_category"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="client_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="client_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="client_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="client_category" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="category_id" foreignKey="client_category_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
            <child column="category_id" foreignKey="client_category_price_category_id_fkey" implied="false" onDeleteCascade="false" table="client_category_price"/>
            <child column="client_category_id" foreignKey="loan_client_category_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="client_category_id" foreignKey="sale_client_category_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="client_category_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="3" name="max_discount" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="client_category_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="client_category_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="client_category_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="client_category_price" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="client_category_price_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_category_price_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_category_price_category_id_fkey" implied="false" onDeleteCascade="false" table="client_category"/>
         </column>
         <column autoUpdated="false" digits="2" id="4" name="price" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="max_discount" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="6" name="commission" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="client_category_price_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="client_category_price_sellable_id_category_id_key" unique="true">
            <column ascending="true" name="sellable_id"/>
            <column ascending="true" name="category_id"/>
         </index>
         <index name="client_category_price_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="client_salary_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="client_salary_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="3" name="new_salary" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="4" name="old_salary" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="user_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_salary_history_user_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="client_salary_history_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="client_salary_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="client_salary_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="commission" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="commission_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="2" id="2" name="value" nullable="false" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="3" name="commission_type" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="sale_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="commission_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="payment_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="commission_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="commission_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="commission_payment_id_key" unique="true">
            <column ascending="true" name="payment_id"/>
         </index>
         <index name="commission_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="commission_source" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="commission_source_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="2" id="2" name="direct_value" nullable="false" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="3" name="installments_value" nullable="false" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="commission_source_category_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="commission_source_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="commission_source_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="commission_source_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="company" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="company_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="3" name="cnpj" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="fancy_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="state_registry" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="city_registry" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="company_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="company_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="company_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="company_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="contact_info" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="contact_info_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="contact_info" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="contact_info_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="contact_info_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="contact_info_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="cost_center" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="cost_center_id" foreignKey="cost_center_entry_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="cost_center_entry"/>
            <child column="cost_center_id" foreignKey="sale_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="cost_center_id" foreignKey="stock_decrease_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="cost_center_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="4" name="budget" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="5" name="is_active" nullable="false" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="cost_center_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cost_center_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="cost_center_entry" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="cost_center_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="cost_center_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="cost_center_entry_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="cost_center"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="cost_center_entry_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="stock_transaction_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="cost_center_entry_stock_transaction_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="cost_center_entry_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cost_center_entry_payment_id_key" unique="true">
            <column ascending="true" name="payment_id"/>
         </index>
         <index name="cost_center_entry_stock_transaction_id_key" unique="true">
            <column ascending="true" name="stock_transaction_id"/>
         </index>
         <index name="cost_center_entry_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="credit_card_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="credit_card_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="auth" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="nsu" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="installments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="card_type" nullable="false" remarks="" size="2147483647" type="credit_card_type"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="6" name="entrance_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="7" name="fee" nullable="false" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="8" name="fee_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="9" name="fare" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="10" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_card_data_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="provider_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_card_data_provider_id_fkey" implied="false" onDeleteCascade="false" table="credit_provider"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="device_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_card_data_device_id_fkey" implied="false" onDeleteCascade="false" table="card_payment_device"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="credit_card_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="credit_card_data_payment_id_key" unique="true">
            <column ascending="true" name="payment_id"/>
         </index>
         <index name="credit_card_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="credit_check_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="credit_check_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="creation_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="3" name="check_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="4" name="identifier" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="status" nullable="false" remarks="" size="2147483647" type="credit_check_status"/>
         <column autoUpdated="false" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_check_history_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="user_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_check_history_user_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="credit_check_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="credit_check_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="credit_provider" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="provider_id" foreignKey="card_operation_cost_provider_id_fkey" implied="false" onDeleteCascade="false" table="card_operation_cost"/>
            <child column="provider_id" foreignKey="credit_card_data_provider_id_fkey" implied="false" onDeleteCascade="false" table="credit_card_data"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="credit_provider_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="12" digits="0" id="3" name="max_installments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="short_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="provider_id" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="6" name="open_contract_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="7" name="default_device_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="credit_provider_default_device_id_fkey" implied="false" onDeleteCascade="false" table="card_payment_device"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="credit_provider_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="credit_provider_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="delivery" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="delivery_id" foreignKey="sale_item_delivery_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="delivery_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="status" nullable="false" remarks="" size="2147483647" type="delivery_status"/>
         <column autoUpdated="false" digits="6" id="3" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="deliver_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="receive_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="tracking_code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="address_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="delivery_address_id_fkey" implied="false" onDeleteCascade="false" table="address"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="transporter_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="delivery_transporter_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="service_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="delivery_service_item_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="delivery_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="delivery_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="device_constant" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="device_constant_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="constant_type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="constant_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="4" name="constant_value" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="constant_enum" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="device_value" nullable="true" remarks="" size="2147483647" type="bytea"/>
         <column autoUpdated="false" digits="0" id="7" name="device_settings_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="device_constant_device_settings_id_fkey" implied="false" onDeleteCascade="false" table="device_settings"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="is_valid_model" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="device_constant_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="device_constant_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="device_settings" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="device_settings_id" foreignKey="device_constant_device_settings_id_fkey" implied="false" onDeleteCascade="false" table="device_constant"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="device_settings_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="brand" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="model" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="device_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="7" name="station_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="device_settings_station_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="device_settings_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="device_settings_device_name_station_id_key" unique="true">
            <column ascending="true" name="device_name"/>
            <column ascending="true" name="station_id"/>
         </index>
         <index name="device_settings_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="employee" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="manager_id" foreignKey="branch_manager_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
            <child column="employee_id" foreignKey="employee_role_history_employee_id_fkey" implied="false" onDeleteCascade="false" table="employee_role_history"/>
            <child column="responsible_id" foreignKey="production_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
            <child column="removed_by_id" foreignKey="stock_decrease_removed_by_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="cancel_responsible_id" foreignKey="transfer_order_cancel_responsible_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="destination_responsible_id" foreignKey="transfer_order_destination_responsible_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="source_responsible_id" foreignKey="transfer_order_source_responsible_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="execution_responsible_id" foreignKey="work_order_execution_responsible_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="quote_responsible_id" foreignKey="work_order_quote_responsible_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="employee_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="6" id="3" name="admission_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="expire_vacation" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="5" name="salary" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="6" name="status" nullable="false" remarks="" size="2147483647" type="employee_status"/>
         <column autoUpdated="false" digits="0" id="7" name="registry_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="education_level" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="dependent_person_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="10" name="role_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_role_id_fkey" implied="false" onDeleteCascade="false" table="employee_role"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="workpermit_data_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_workpermit_data_id_fkey" implied="false" onDeleteCascade="false" table="work_permit_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="military_data_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_military_data_id_fkey" implied="false" onDeleteCascade="false" table="military_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="13" name="voter_data_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_voter_data_id_fkey" implied="false" onDeleteCascade="false" table="voter_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="14" name="bank_account_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_bank_account_id_fkey" implied="false" onDeleteCascade="false" table="bank_account"/>
         </column>
         <column autoUpdated="false" digits="0" id="15" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="16" name="branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="employee_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="employee_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="employee_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="employee_role" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="role_id" foreignKey="employee_role_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
            <child column="role_id" foreignKey="employee_role_history_role_id_fkey" implied="false" onDeleteCascade="false" table="employee_role_history"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="employee_role_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="employee_role_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="employee_role_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="employee_role_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="employee_role_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="employee_role_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="began" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="3" name="ended" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="4" name="salary" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="role_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_role_history_role_id_fkey" implied="false" onDeleteCascade="false" table="employee_role"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="employee_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="employee_role_history_employee_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="employee_role_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="employee_role_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="event" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('event_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="bigserial"/>
         <column autoUpdated="false" digits="6" id="1" name="date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="2" name="event_type" nullable="false" remarks="" size="2147483647" type="event_type"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="false" remarks="" size="2147483647" type="varchar"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="event_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="fiscal_book_entry" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="fiscal_book_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="entry_type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="3" name="icms_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="iss_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="ipi_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="6" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="7" name="is_reversal" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="8" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_book_entry_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_book_entry_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="drawee_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_book_entry_drawee_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="payment_group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_book_entry_payment_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="fiscal_book_entry_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fiscal_book_entry_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="fiscal_day_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="fiscal_day_history_id" foreignKey="fiscal_day_tax_fiscal_day_history_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_day_tax"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="fiscal_day_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="emission_date" nullable="true" remarks="" size="13" type="date"/>
         <column autoUpdated="false" digits="0" id="3" name="station_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_day_history_station_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="serial" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="serial_id" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="coupon_start" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="coupon_end" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="cro" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="crz" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="10" name="period_total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="12" name="tax_total" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="6" id="13" name="reduction_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="fiscal_day_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fiscal_day_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="fiscal_day_tax" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="fiscal_day_tax_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="3" name="value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="fiscal_day_history_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_day_tax_fiscal_day_history_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_day_history"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="type" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="fiscal_day_tax_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fiscal_day_tax_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="fiscal_sale_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="fiscal_sale_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="fiscal_sale_history_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="document_type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="document" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="coo" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="document_counter" nullable="true" remarks="" size="10" type="int4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="fiscal_sale_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fiscal_sale_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="grid_attribute" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="attribute_id" foreignKey="grid_option_attribute_id_fkey" implied="false" onDeleteCascade="false" table="grid_option"/>
            <child column="attribute_id" foreignKey="product_attribute_attribute_id_fkey" implied="false" onDeleteCascade="false" table="product_attribute"/>
            <child column="attribute_id" foreignKey="product_option_map_attribute_id_fkey" implied="false" onDeleteCascade="false" table="product_option_map"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="grid_attribute_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="3" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="4" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="grid_attribute_group_id_fkey" implied="false" onDeleteCascade="false" table="grid_group"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="grid_attribute_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grid_attribute_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="grid_group" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="group_id" foreignKey="grid_attribute_group_id_fkey" implied="false" onDeleteCascade="false" table="grid_attribute"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="grid_group_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="3" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="grid_group_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grid_group_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="grid_option" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="option_id" foreignKey="product_option_map_option_id_fkey" implied="false" onDeleteCascade="false" table="product_option_map"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="grid_option_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="3" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="4" name="option_order" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="attribute_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="grid_option_attribute_id_fkey" implied="false" onDeleteCascade="false" table="grid_attribute"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="grid_option_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grid_option_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="image" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="image_id" foreignKey="sellable_image_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="image_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="image" nullable="true" remarks="" size="2147483647" type="bytea"/>
         <column autoUpdated="false" digits="0" id="3" name="thumbnail" nullable="true" remarks="" size="2147483647" type="bytea"/>
         <column autoUpdated="false" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="image_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="image_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="individual" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="individual_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="3" name="cpf" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="rg_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="5" name="birth_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="occupation" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="marital_status" nullable="false" remarks="" size="2147483647" type="marital_status"/>
         <column autoUpdated="false" digits="0" id="8" name="father_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="mother_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="10" name="rg_expedition_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="11" name="rg_expedition_local" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="gender" nullable="false" remarks="" size="2147483647" type="individual_gender"/>
         <column autoUpdated="false" digits="0" id="13" name="spouse_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="14" name="birth_location_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="individual_birth_location_id_fkey" implied="false" onDeleteCascade="false" table="city_location"/>
         </column>
         <column autoUpdated="false" digits="0" id="15" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="individual_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="individual_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="individual_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="individual_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="installed_plugin" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="installed_plugin_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="plugin_name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="plugin_version" nullable="true" remarks="" size="10" type="int4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="installed_plugin_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="installed_plugin_plugin_name_key" unique="true">
            <column ascending="true" name="plugin_name"/>
         </index>
         <index name="installed_plugin_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="inventory" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="inventory_id" foreignKey="inventory_item_inventory_id_fkey" implied="false" onDeleteCascade="false" table="inventory_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="inventory_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('inventory_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="inventory_status"/>
         <column autoUpdated="false" digits="6" id="4" name="open_date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="close_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="responsible_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="inventory_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="inventory_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="inventory_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="inventory_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="inventory_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_item_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="3" id="3" name="recorded_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="4" name="actual_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="5" name="counted_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="6" name="inventory_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_item_inventory_id_fkey" implied="false" onDeleteCascade="false" table="inventory"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="reason" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="8" id="8" name="product_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="9" name="is_adjusted" nullable="false" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="10" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="cfop_data_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="inventory_item_cfop_data_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="inventory_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="inventory_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="invoice_id" foreignKey="loan_invoice_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="invoice_id" foreignKey="returned_sale_invoice_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="invoice_id" foreignKey="sale_invoice_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="invoice_id" foreignKey="stock_decrease_invoice_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="invoice_id" foreignKey="transfer_order_invoice_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="operation_nature" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="invoice_type" nullable="false" remarks="" size="2147483647" type="invoice_type"/>
         <column autoUpdated="false" digits="0" id="5" name="key" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="cnf" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="invoice_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_branch_id_invoice_number_key" unique="true">
            <column ascending="true" name="branch_id"/>
            <column ascending="true" name="invoice_number"/>
         </index>
         <index name="invoice_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_field" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_field_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="field_name" nullable="false" remarks="" size="2147483647" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="layout_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="invoice_field_layout_id_fkey" implied="false" onDeleteCascade="false" table="invoice_layout"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="x" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="5" name="y" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="width" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="height" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="8" name="content" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_field_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_field_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_item_cofins" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="cofins_info_id" foreignKey="returned_sale_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="cofins_info_id" foreignKey="sale_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="cofins_info_id" foreignKey="stock_decrease_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="cofins_info_id" foreignKey="transfer_order_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_item_cofins_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="'percentage'::product_cofins_template_calculo" digits="0" id="3" name="calculo" nullable="false" remarks="" size="2147483647" type="product_cofins_template_calculo"/>
         <column autoUpdated="false" digits="2" id="4" name="v_bc" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="p_cofins" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="4" id="6" name="q_bc_prod" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="7" name="v_cofins" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_item_cofins_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_item_cofins_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_item_icms" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="icms_info_id" foreignKey="loan_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
            <child column="icms_info_id" foreignKey="returned_sale_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="icms_info_id" foreignKey="sale_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="icms_info_id" foreignKey="stock_decrease_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="icms_info_id" foreignKey="transfer_order_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_item_icms_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="true" digits="0" id="2" name="bc_include_ipi" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="3" name="bc_st_include_ipi" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="4" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="csosn" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="mod_bc" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="mod_bc_st" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="orig" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="9" name="p_cred_sn" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="10" name="p_mva_st" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="p_icms" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="12" name="p_icms_st" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="13" name="p_red_bc" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="14" name="p_red_bc_st" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="15" name="v_bc" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="16" name="v_bc_st" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="17" name="v_bc_st_ret" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="18" name="v_cred_icms_sn" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="19" name="v_icms" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="20" name="v_icms_st" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="21" name="v_icms_st_ret" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_item_icms_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_item_icms_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_item_ipi" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="ipi_info_id" foreignKey="loan_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
            <child column="ipi_info_id" foreignKey="returned_sale_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="ipi_info_id" foreignKey="sale_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="ipi_info_id" foreignKey="stock_decrease_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="ipi_info_id" foreignKey="transfer_order_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_item_ipi_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="cl_enq" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="cnpj_prod" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="c_selo" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="q_selo" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="c_enq" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="calculo" nullable="true" remarks="" size="2147483647" type="product_ipi_template_calculo"/>
         <column autoUpdated="false" digits="0" id="8" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="9" name="p_ipi" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="4" id="10" name="q_unid" nullable="true" remarks="" size="16" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="v_ipi" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="12" name="v_bc" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="4" id="13" name="v_unid" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_item_ipi_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_item_ipi_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_item_pis" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="pis_info_id" foreignKey="returned_sale_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="pis_info_id" foreignKey="sale_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="pis_info_id" foreignKey="stock_decrease_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="pis_info_id" foreignKey="transfer_order_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_item_pis_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="'percentage'::product_pis_template_calculo" digits="0" id="3" name="calculo" nullable="false" remarks="" size="2147483647" type="product_pis_template_calculo"/>
         <column autoUpdated="false" digits="2" id="4" name="v_bc" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="p_pis" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="4" id="6" name="q_bc_prod" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="7" name="v_pis" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_item_pis_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_item_pis_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_layout" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="layout_id" foreignKey="invoice_field_layout_id_fkey" implied="false" onDeleteCascade="false" table="invoice_field"/>
            <child column="layout_id" foreignKey="invoice_printer_layout_id_fkey" implied="false" onDeleteCascade="false" table="invoice_printer"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_layout_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="false" remarks="" size="2147483647" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="width" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="height" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="5" name="continuous_page" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_layout_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_layout_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="invoice_printer" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="invoice_printer_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="device_name" nullable="false" remarks="" size="2147483647" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="description" nullable="false" remarks="" size="2147483647" type="varchar"/>
         <column autoUpdated="false" digits="0" id="4" name="station_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="invoice_printer_station_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="layout_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="invoice_printer_layout_id_fkey" implied="false" onDeleteCascade="false" table="invoice_layout"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="invoice_printer_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="invoice_printer_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="loan" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="loan_id" foreignKey="loan_item_loan_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="loan_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('loan_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="close_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="expire_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="status" nullable="false" remarks="" size="2147483647" type="loan_status"/>
         <column autoUpdated="false" digits="0" id="7" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="removed_by" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="client_category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_client_category_id_fkey" implied="false" onDeleteCascade="false" table="client_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="13" name="invoice_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_invoice_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="loan_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="loan_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="loan_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="loan_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="loan_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="3" name="sale_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="4" name="return_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="6" name="base_price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="7" name="loan_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_item_loan_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="icms_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="ipi_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="loan_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="loan_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="loan_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="login_user" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="attendant_id" foreignKey="calls_attendant_id_fkey" implied="false" onDeleteCascade="false" table="calls"/>
            <child column="user_id" foreignKey="client_salary_history_user_id_fkey" implied="false" onDeleteCascade="false" table="client_salary_history"/>
            <child column="user_id" foreignKey="credit_check_history_user_id_fkey" implied="false" onDeleteCascade="false" table="credit_check_history"/>
            <child column="responsible_id" foreignKey="inventory_responsible_id_fkey" implied="false" onDeleteCascade="false" table="inventory"/>
            <child column="responsible_id" foreignKey="loan_responsible_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="author_id" foreignKey="payment_comment_author_id_fkey" implied="false" onDeleteCascade="false" table="payment_comment"/>
            <child column="responsible_id" foreignKey="payment_renegotiation_responsible_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
            <child column="tested_by_id" foreignKey="production_item_quality_result_tested_by_id_fkey" implied="false" onDeleteCascade="false" table="production_item_quality_result"/>
            <child column="produced_by_id" foreignKey="production_produced_item_produced_by_id_fkey" implied="false" onDeleteCascade="false" table="production_produced_item"/>
            <child column="responsible_id" foreignKey="purchase_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="responsible_id" foreignKey="receiving_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
            <child column="confirm_responsible_id" foreignKey="returned_sale_confirm_responsible_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="responsible_id" foreignKey="returned_sale_responsible_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="undo_responsible_id" foreignKey="returned_sale_undo_responsible_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="author_id" foreignKey="sale_comment_author_id_fkey" implied="false" onDeleteCascade="false" table="sale_comment"/>
            <child column="responsible_id" foreignKey="stock_decrease_responsible_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="responsible_id" foreignKey="stock_transaction_history_responsible_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
            <child column="responsible_close_id" foreignKey="till_responsible_close_id_fkey" implied="false" onDeleteCascade="false" table="till"/>
            <child column="responsible_open_id" foreignKey="till_responsible_open_id_fkey" implied="false" onDeleteCascade="false" table="till"/>
            <child column="user_id" foreignKey="user_branch_access_user_id_fkey" implied="false" onDeleteCascade="false" table="user_branch_access"/>
            <child column="user_id" foreignKey="work_order_history_user_id_fkey" implied="false" onDeleteCascade="false" table="work_order_history"/>
            <child column="receive_responsible_id" foreignKey="work_order_package_receive_responsible_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
            <child column="send_responsible_id" foreignKey="work_order_package_send_responsible_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="login_user_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="username" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="pw_hash" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="5" name="profile_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="login_user_profile_id_fkey" implied="false" onDeleteCascade="false" table="user_profile"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="login_user_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="login_user_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="login_user_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="login_user_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
         <index name="login_user_username_key" unique="true">
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table name="military_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="military_data_id" foreignKey="employee_military_data_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="military_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="series_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="category" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="military_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="military_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="parameter_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="parameter_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="field_name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="field_value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="is_editable" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="parameter_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="parameter_data_field_name_key" unique="true">
            <column ascending="true" name="field_name"/>
         </index>
         <index name="parameter_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="payment_id" foreignKey="account_transaction_payment_id_fkey" implied="false" onDeleteCascade="false" table="account_transaction"/>
            <child column="payment_id" foreignKey="check_data_payment_id_fkey" implied="false" onDeleteCascade="false" table="check_data"/>
            <child column="payment_id" foreignKey="commission_payment_id_fkey" implied="false" onDeleteCascade="false" table="commission"/>
            <child column="payment_id" foreignKey="cost_center_entry_payment_id_fkey" implied="false" onDeleteCascade="false" table="cost_center_entry"/>
            <child column="payment_id" foreignKey="credit_card_data_payment_id_fkey" implied="false" onDeleteCascade="false" table="credit_card_data"/>
            <child column="payment_id" foreignKey="payment_change_history_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment_change_history"/>
            <child column="payment_id" foreignKey="payment_comment_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment_comment"/>
            <child column="payment_id" foreignKey="till_entry_payment_id_fkey" implied="false" onDeleteCascade="false" table="till_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('payment_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="payment_type" nullable="false" remarks="" size="2147483647" type="payment_type"/>
         <column autoUpdated="false" digits="0" id="4" name="status" nullable="false" remarks="" size="2147483647" type="payment_status"/>
         <column autoUpdated="false" digits="6" id="5" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="6" name="due_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="7" name="paid_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="8" name="cancel_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="9" name="paid_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="10" name="base_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="12" name="interest" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="13" name="discount" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="14" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="15" name="payment_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="16" name="penalty" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="17" name="bill_received" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="18" name="attachment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_attachment_id_fkey" implied="false" onDeleteCascade="false" table="attachment"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="method_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_method_id_fkey" implied="false" onDeleteCascade="false" table="payment_method"/>
         </column>
         <column autoUpdated="false" digits="0" id="20" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <column autoUpdated="false" digits="0" id="21" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="22" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_category_id_fkey" implied="false" onDeleteCascade="false" table="payment_category"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_attachment_id_key" unique="true">
            <column ascending="true" name="attachment_id"/>
         </index>
         <index name="payment_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="payment_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_category" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="category_id" foreignKey="payment_category_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_category_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="'payable'::payment_category_type" digits="0" id="3" name="category_type" nullable="false" remarks="" size="2147483647" type="payment_category_type"/>
         <column autoUpdated="false" digits="0" id="4" name="color" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_category_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_category_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="payment_category_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_change_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_change_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="change_reason" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="3" name="last_due_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="change_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="new_due_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="last_status" nullable="false" remarks="" size="2147483647" type="payment_status"/>
         <column autoUpdated="false" digits="0" id="7" name="new_status" nullable="false" remarks="" size="2147483647" type="payment_status"/>
         <column autoUpdated="false" digits="0" id="8" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_change_history_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_change_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_change_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_comment" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_comment_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="3" name="comment" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_comment_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="author_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_comment_author_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_comment_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_comment_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_flow_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_flow_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="history_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="3" name="to_receive" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="received" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="to_pay" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="6" name="paid" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="7" name="to_receive_payments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="received_payments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="to_pay_payments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="10" name="paid_payments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="11" name="balance_expected" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="12" name="balance_real" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_flow_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_flow_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_group" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="payment_group_id" foreignKey="fiscal_book_entry_payment_group_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_book_entry"/>
            <child column="group_id" foreignKey="payment_group_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
            <child column="group_id" foreignKey="payment_renegotiation_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
            <child column="group_id" foreignKey="purchase_order_group_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="group_id" foreignKey="sale_group_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="group_id" foreignKey="stock_decrease_group_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_group_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="payer_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_group_payer_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="renegotiation_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_group_renegotiation_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="recipient_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_group_recipient_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_group_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_group_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_method" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="method_id" foreignKey="payment_method_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_method_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="2" id="3" name="daily_interest" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="penalty" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="method_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="payment_day" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="closing_day" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="max_installments" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="destination_account_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_method_destination_account_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_method_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_method_method_name_key" unique="true">
            <column ascending="true" name="method_name"/>
         </index>
         <index name="payment_method_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="payment_renegotiation" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="renegotiation_id" foreignKey="payment_group_renegotiation_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="payment_renegotiation_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('payment_renegotiation_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="close_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="5" name="status" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="6" name="discount_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="7" name="surcharge_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="8" name="total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="9" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="10" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_renegotiation_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_renegotiation_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_renegotiation_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="13" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="payment_renegotiation_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="payment_renegotiation_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="payment_renegotiation_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="payment_renegotiation_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="person" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="person_id" foreignKey="address_person_id_fkey" implied="false" onDeleteCascade="false" table="address"/>
            <child column="person_id" foreignKey="branch_person_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
            <child column="person_id" foreignKey="calls_person_id_fkey" implied="false" onDeleteCascade="false" table="calls"/>
            <child column="person_id" foreignKey="client_person_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
            <child column="person_id" foreignKey="company_person_id_fkey" implied="false" onDeleteCascade="false" table="company"/>
            <child column="person_id" foreignKey="contact_info_person_id_fkey" implied="false" onDeleteCascade="false" table="contact_info"/>
            <child column="person_id" foreignKey="employee_person_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
            <child column="drawee_id" foreignKey="fiscal_book_entry_drawee_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_book_entry"/>
            <child column="person_id" foreignKey="individual_person_id_fkey" implied="false" onDeleteCascade="false" table="individual"/>
            <child column="person_id" foreignKey="login_user_person_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
            <child column="payer_id" foreignKey="payment_group_payer_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
            <child column="recipient_id" foreignKey="payment_group_recipient_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
            <child column="merged_with_id" foreignKey="person_merged_with_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
            <child column="person_id" foreignKey="sales_person_person_id_fkey" implied="false" onDeleteCascade="false" table="sales_person"/>
            <child column="person_id" foreignKey="stock_decrease_person_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="person_id" foreignKey="supplier_person_id_fkey" implied="false" onDeleteCascade="false" table="supplier"/>
            <child column="person_id" foreignKey="transporter_person_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="person_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="phone_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="mobile_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="fax_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="email" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="merged_with_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="person_merged_with_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="person_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="person_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="plugin_egg" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="plugin_egg_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="plugin_name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="egg_md5sum" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="egg_content" nullable="true" remarks="" size="2147483647" type="bytea"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="plugin_egg_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="plugin_egg_plugin_name_key" unique="true">
            <column ascending="true" name="plugin_name"/>
         </index>
         <index name="plugin_egg_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="product_id" foreignKey="inventory_item_product_id_fkey" implied="false" onDeleteCascade="false" table="inventory_item"/>
            <child column="parent_id" foreignKey="product_parent_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
            <child column="product_id" foreignKey="product_attribute_product_id_fkey" implied="false" onDeleteCascade="false" table="product_attribute"/>
            <child column="component_id" foreignKey="product_component_component_id_fkey" implied="false" onDeleteCascade="false" table="product_component"/>
            <child column="product_id" foreignKey="product_component_product_id_fkey" implied="false" onDeleteCascade="false" table="product_component"/>
            <child column="product_id" foreignKey="product_option_map_product_id_fkey" implied="false" onDeleteCascade="false" table="product_option_map"/>
            <child column="product_id" foreignKey="product_quality_test_product_id_fkey" implied="false" onDeleteCascade="false" table="product_quality_test"/>
            <child column="product_id" foreignKey="product_supplier_info_product_id_fkey" implied="false" onDeleteCascade="false" table="product_supplier_info"/>
            <child column="product_id" foreignKey="production_item_product_id_fkey" implied="false" onDeleteCascade="false" table="production_item"/>
            <child column="product_id" foreignKey="production_material_product_id_fkey" implied="false" onDeleteCascade="false" table="production_material"/>
            <child column="product_id" foreignKey="production_produced_item_product_id_fkey" implied="false" onDeleteCascade="false" table="production_produced_item"/>
            <child column="id" foreignKey="storable_id_fkey" implied="false" onDeleteCascade="false" table="storable"/>
            <parent column="id" foreignKey="product_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="2" name="consignment" nullable="false" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="3" name="location" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="part_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="family" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="brand" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="model" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="ncm" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="ex_tipi" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="10" name="genero" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="production_time" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="12" name="manage_stock" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="13" name="is_composed" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="2" id="14" name="width" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="15" name="height" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="16" name="depth" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="17" name="weight" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="18" name="icms_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_icms_template_id_fkey" implied="false" onDeleteCascade="false" table="product_icms_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="ipi_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_ipi_template_id_fkey" implied="false" onDeleteCascade="false" table="product_ipi_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="20" name="manufacturer_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_manufacturer_id_fkey" implied="false" onDeleteCascade="false" table="product_manufacturer"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="21" name="is_grid" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="22" name="parent_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_parent_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="23" name="internal_use" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="24" name="pis_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_pis_template_id_fkey" implied="false" onDeleteCascade="false" table="product_pis_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="25" name="cofins_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_cofins_template_id_fkey" implied="false" onDeleteCascade="false" table="product_cofins_template"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="26" name="is_package" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_attribute" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_attribute_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_attribute_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="attribute_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_attribute_attribute_id_fkey" implied="false" onDeleteCascade="false" table="grid_attribute"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_attribute_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_attribute_product_id_attribute_id_key" unique="true">
            <column ascending="true" name="product_id"/>
            <column ascending="true" name="attribute_id"/>
         </index>
         <index name="product_attribute_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_cofins_template" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="cofins_template_id" foreignKey="product_cofins_template_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_cofins_template_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_tax_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_cofins_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_tax_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="'percentage'::product_cofins_template_calculo" digits="0" id="4" name="calculo" nullable="false" remarks="" size="2147483647" type="product_cofins_template_calculo"/>
         <column autoUpdated="false" digits="2" id="5" name="p_cofins" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_cofins_template_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_cofins_template_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_component" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_component_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_component_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="component_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_component_component_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="design_reference" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="3" id="5" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="6" name="price" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_component_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_component_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity_sold" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="3" name="quantity_received" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="4" name="quantity_transfered" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="5" name="quantity_consumed" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="6" name="quantity_produced" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="7" name="quantity_lost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="8" name="sold_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="9" name="received_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="10" name="production_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="11" name="decreased_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="3" id="12" name="quantity_decreased" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="13" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_history_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="14" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_history_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_icms_template" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="icms_template_id" foreignKey="product_icms_template_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_icms_template_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_tax_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_icms_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_tax_template"/>
         </column>
         <column autoUpdated="false" defaultValue="true" digits="0" id="3" name="bc_include_ipi" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="4" name="bc_st_include_ipi" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="5" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="csosn" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="orig" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="mod_bc" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="mod_bc_st" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="10" name="p_cred_sn" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="6" id="11" name="p_cred_sn_valid_until" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="12" name="p_icms" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="13" name="p_icms_st" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="14" name="p_mva_st" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="15" name="p_red_bc" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="16" name="p_red_bc_st" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_icms_template_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_icms_template_product_tax_template_id_key" unique="true">
            <column ascending="true" name="product_tax_template_id"/>
         </index>
         <index name="product_icms_template_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_ipi_template" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="ipi_template_id" foreignKey="product_ipi_template_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_ipi_template_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_tax_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_ipi_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_tax_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="cl_enq" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="cnpj_prod" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="c_selo" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="q_selo" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="c_enq" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="calculo" nullable="false" remarks="" size="2147483647" type="product_ipi_template_calculo"/>
         <column autoUpdated="false" digits="0" id="9" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="10" name="p_ipi" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="4" id="11" name="q_unid" nullable="true" remarks="" size="16" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_ipi_template_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_ipi_template_product_tax_template_id_key" unique="true">
            <column ascending="true" name="product_tax_template_id"/>
         </index>
         <index name="product_ipi_template_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_manufacturer" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="manufacturer_id" foreignKey="product_manufacturer_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_manufacturer_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_manufacturer_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_manufacturer_code_key" unique="true">
            <column ascending="true" name="code"/>
         </index>
         <index name="product_manufacturer_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="product_manufacturer_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_option_map" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_option_map_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_option_map_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="attribute_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_option_map_attribute_id_fkey" implied="false" onDeleteCascade="false" table="grid_attribute"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="option_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_option_map_option_id_fkey" implied="false" onDeleteCascade="false" table="grid_option"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_option_map_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_option_map_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_pis_template" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="pis_template_id" foreignKey="product_pis_template_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_pis_template_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_tax_template_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_pis_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_tax_template"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="cst" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="'percentage'::product_pis_template_calculo" digits="0" id="4" name="calculo" nullable="false" remarks="" size="2147483647" type="product_pis_template_calculo"/>
         <column autoUpdated="false" digits="2" id="5" name="p_pis" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_pis_template_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_pis_template_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_quality_test" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="quality_test_id" foreignKey="production_item_quality_result_quality_test_id_fkey" implied="false" onDeleteCascade="false" table="production_item_quality_result"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_quality_test_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_quality_test_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="test_type" nullable="false" remarks="" size="2147483647" type="product_quality_test_type"/>
         <column autoUpdated="false" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="success_value" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_quality_test_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_quality_test_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_stock_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_stock_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="8" id="2" name="stock_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="3" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="storable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_stock_item_storable_id_fkey" implied="false" onDeleteCascade="false" table="storable"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_stock_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_stock_item_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_stock_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_stock_item_branch_id_storable_id_batch_id_key" unique="true">
            <column ascending="true" name="branch_id"/>
            <column ascending="true" name="storable_id"/>
            <column ascending="true" name="batch_id"/>
         </index>
         <index name="product_stock_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="product_supplier_info" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_supplier_info_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="supplier_code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="8" id="3" name="base_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="is_main_supplier" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="2" id="6" name="icms" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="lead_time" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="1" digits="3" id="8" name="minimum_purchase" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="9" name="supplier_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_supplier_info_supplier_id_fkey" implied="false" onDeleteCascade="false" table="supplier"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="product_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="product_supplier_info_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_supplier_info_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_supplier_info_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
         <index name="unique_supplier_code" unique="true">
            <column ascending="true" name="supplier_id"/>
            <column ascending="true" name="product_id"/>
            <column ascending="true" name="supplier_code"/>
         </index>
      </table>
      <table name="product_tax_template" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="product_tax_template_id" foreignKey="product_cofins_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_cofins_template"/>
            <child column="product_tax_template_id" foreignKey="product_icms_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_icms_template"/>
            <child column="product_tax_template_id" foreignKey="product_ipi_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_ipi_template"/>
            <child column="product_tax_template_id" foreignKey="product_pis_template_product_tax_template_id_fkey" implied="false" onDeleteCascade="false" table="product_pis_template"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="product_tax_template_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="tax_type" nullable="true" remarks="" size="2147483647" type="product_tax_template_tax_type"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="product_tax_template_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="product_tax_template_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="3" name="produced" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="4" name="lost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_item_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_item_order_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_item_quality_result" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_item_quality_result_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="produced_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_item_quality_result_produced_item_id_fkey" implied="false" onDeleteCascade="false" table="production_produced_item"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="quality_test_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_item_quality_result_quality_test_id_fkey" implied="false" onDeleteCascade="false" table="product_quality_test"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="tested_by_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_item_quality_result_tested_by_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="6" id="5" name="tested_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="result_value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="test_passed" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_item_quality_result_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_item_quality_result_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_material" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_material_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="needed" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="3" name="consumed" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="4" name="allocated" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="5" name="to_purchase" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="6" name="to_make" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="7" name="lost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="8" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_material_order_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_material_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_material_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_material_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_order" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="order_id" foreignKey="production_item_order_id_fkey" implied="false" onDeleteCascade="false" table="production_item"/>
            <child column="order_id" foreignKey="production_material_order_id_fkey" implied="false" onDeleteCascade="false" table="production_material"/>
            <child column="order_id" foreignKey="production_produced_item_order_id_fkey" implied="false" onDeleteCascade="false" table="production_produced_item"/>
            <child column="order_id" foreignKey="production_service_order_id_fkey" implied="false" onDeleteCascade="false" table="production_service"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('production_order_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="production_order_status"/>
         <column autoUpdated="false" digits="6" id="4" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="close_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="6" name="expected_start_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="7" name="start_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="8" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="6" id="11" name="cancel_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_order_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_order_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="production_order_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_produced_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="produced_item_id" foreignKey="production_item_quality_result_produced_item_id_fkey" implied="false" onDeleteCascade="false" table="production_item_quality_result"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_produced_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_produced_item_order_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="product_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_produced_item_product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="produced_by_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_produced_item_produced_by_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="6" id="5" name="produced_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="serial_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="7" name="entered_stock" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="8" name="test_passed" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_produced_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_produced_item_product_id_serial_number_key" unique="true">
            <column ascending="true" name="product_id"/>
            <column ascending="true" name="serial_number"/>
         </index>
         <index name="production_produced_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="production_service" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="production_service_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="3" name="service_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_service_service_id_fkey" implied="false" onDeleteCascade="false" table="service"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="production_service_order_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="production_service_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="production_service_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="profile_settings" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="profile_settings_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="app_dir_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="has_permission" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="4" name="user_profile_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="profile_settings_user_profile_id_fkey" implied="false" onDeleteCascade="false" table="user_profile"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="profile_settings_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="profile_settings_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="purchase_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="parent_item_id" foreignKey="purchase_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
            <child column="purchase_item_id" foreignKey="receiving_order_item_purchase_item_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="purchase_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="3" name="quantity_received" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="8" id="4" name="base_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="8" id="5" name="cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="6" name="expected_receival_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="7" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_item_order_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="3" id="9" name="quantity_sold" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="10" name="quantity_returned" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="11" name="parent_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="purchase_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="purchase_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="purchase_order" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="order_id" foreignKey="purchase_item_order_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
            <child column="purchase_id" foreignKey="purchase_receiving_map_purchase_id_fkey" implied="false" onDeleteCascade="false" table="purchase_receiving_map"/>
            <child column="purchase_id" foreignKey="quotation_purchase_id_fkey" implied="false" onDeleteCascade="false" table="quotation"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="purchase_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('purchase_order_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="purchase_order_status"/>
         <column autoUpdated="false" digits="6" id="4" name="open_date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="quote_deadline" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="6" name="expected_receival_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="7" name="expected_pay_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="8" name="receival_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="9" name="confirm_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="10" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="11" name="salesperson_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="freight_type" nullable="false" remarks="" size="2147483647" type="purchase_order_freight_type"/>
         <column autoUpdated="false" digits="2" id="13" name="expected_freight" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="14" name="surcharge_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="15" name="discount_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="16" name="consigned" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="17" name="supplier_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_order_supplier_id_fkey" implied="false" onDeleteCascade="false" table="supplier"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="transporter_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_order_transporter_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
         </column>
         <column autoUpdated="false" digits="0" id="20" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="21" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_order_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="purchase_order_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="purchase_order_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="purchase_order_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="purchase_receiving_map" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="purchase_receiving_map_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="purchase_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_receiving_map_purchase_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="receiving_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="purchase_receiving_map_receiving_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="purchase_receiving_map_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="purchase_receiving_map_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="quotation" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="quotation_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('quotation_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="purchase_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="quotation_purchase_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="quotation_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="quotation_group_id_fkey" implied="false" onDeleteCascade="false" table="quote_group"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="quotation_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quotation_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="quotation_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="quote_group" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="group_id" foreignKey="quotation_group_id_fkey" implied="false" onDeleteCascade="false" table="quotation"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="quote_group_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('quote_group_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="quote_group_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="quote_group_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quote_group_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="quote_group_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="receiving_order" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="receiving_id" foreignKey="purchase_receiving_map_receiving_id_fkey" implied="false" onDeleteCascade="false" table="purchase_receiving_map"/>
            <child column="receiving_order_id" foreignKey="receiving_order_item_receiving_order_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="receiving_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('receiving_order_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="receiving_order_status"/>
         <column autoUpdated="false" digits="6" id="4" name="receival_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="confirm_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="7" name="freight_total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="8" name="surcharge_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="9" name="discount_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="10" name="icms_total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="ipi_total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="'fob-payment'::receiving_order_freight_type" digits="0" id="12" name="freight_type" nullable="false" remarks="" size="2147483647" type="receiving_order_freight_type"/>
         <column autoUpdated="false" digits="0" id="13" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="14" name="invoice_total" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="15" name="cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="16" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="17" name="supplier_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_supplier_id_fkey" implied="false" onDeleteCascade="false" table="supplier"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="transporter_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_transporter_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
         </column>
         <column autoUpdated="false" digits="2" id="20" name="secure_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="21" name="expense_value" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="receiving_order_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="receiving_order_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="receiving_order_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="receiving_order_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="parent_item_id" foreignKey="receiving_order_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="receiving_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="8" id="3" name="cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="receiving_order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_item_receiving_order_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="purchase_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_item_purchase_item_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="parent_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="receiving_order_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="receiving_order_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="receiving_order_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="returned_sale" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="returned_sale_id" foreignKey="returned_sale_item_returned_sale_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="returned_sale_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('returned_sale_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="return_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="4" name="reason" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="new_sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_new_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="status" nullable="true" remarks="" size="2147483647" type="returned_sale_status"/>
         <column autoUpdated="false" digits="0" id="11" name="confirm_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_confirm_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="6" id="12" name="confirm_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="13" name="undo_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="14" name="undo_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_undo_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="15" name="undo_reason" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="16" name="invoice_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_invoice_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="returned_sale_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="returned_sale_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="returned_sale_invoice_number_branch_id_key" unique="true">
            <column ascending="true" name="invoice_number"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="returned_sale_new_sale_id_key" unique="true">
            <column ascending="true" name="new_sale_id"/>
         </index>
         <index name="returned_sale_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="returned_sale_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="parent_item_id" foreignKey="returned_sale_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="returned_sale_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="3" name="price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="sale_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_sale_item_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="returned_sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_returned_sale_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="icms_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="ipi_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="pis_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_pis"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="cofins_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_cofins"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="parent_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="returned_sale_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="returned_sale_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="returned_sale_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sale" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="sale_id" foreignKey="commission_sale_id_fkey" implied="false" onDeleteCascade="false" table="commission"/>
            <child column="sale_id" foreignKey="fiscal_sale_history_sale_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_sale_history"/>
            <child column="new_sale_id" foreignKey="returned_sale_new_sale_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="sale_id" foreignKey="returned_sale_sale_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="sale_id" foreignKey="sale_comment_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale_comment"/>
            <child column="sale_id" foreignKey="sale_item_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="sale_id" foreignKey="work_order_sale_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sale_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('sale_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="coupon_id" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="service_invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="status" nullable="false" remarks="" size="2147483647" type="sale_status"/>
         <column autoUpdated="false" digits="2" id="7" name="discount_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="8" name="surcharge_value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="9" name="total_amount" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="10" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="11" name="close_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="12" name="confirm_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="13" name="cancel_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="14" name="return_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="15" name="expire_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="16" name="operation_nature" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="17" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="client_category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_client_category_id_fkey" implied="false" onDeleteCascade="false" table="client_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="20" name="salesperson_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_salesperson_id_fkey" implied="false" onDeleteCascade="false" table="sales_person"/>
         </column>
         <column autoUpdated="false" digits="0" id="21" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="22" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <column autoUpdated="false" digits="0" id="23" name="transporter_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_transporter_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
         </column>
         <column autoUpdated="false" digits="0" id="24" name="cost_center_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="cost_center"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="25" name="paid" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="26" name="invoice_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_invoice_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
         </column>
         <column autoUpdated="false" digits="0" id="27" name="sale_token_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_sale_token_id_fkey" implied="false" onDeleteCascade="false" table="sale_token"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sale_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sale_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="sale_invoice_number_branch_id_key" unique="true">
            <column ascending="true" name="invoice_number"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="sale_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sale_comment" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sale_comment_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="3" name="comment" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="sale_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_comment_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="author_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_comment_author_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sale_comment_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sale_comment_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sale_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="service_item_id" foreignKey="delivery_service_item_id_fkey" implied="false" onDeleteCascade="false" table="delivery"/>
            <child column="sale_item_id" foreignKey="returned_sale_item_sale_item_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="parent_item_id" foreignKey="sale_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="sale_item_id" foreignKey="work_order_item_sale_item_id_fkey" implied="false" onDeleteCascade="false" table="work_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sale_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="3" name="quantity_decreased" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="base_price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="7" name="estimated_fix_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="8" name="completion_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" defaultValue="0" digits="8" id="9" name="average_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="10" name="sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="13" name="icms_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
         </column>
         <column autoUpdated="false" digits="0" id="14" name="ipi_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
         </column>
         <column autoUpdated="false" digits="0" id="15" name="cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="16" name="delivery_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_delivery_id_fkey" implied="false" onDeleteCascade="false" table="delivery"/>
         </column>
         <column autoUpdated="false" digits="0" id="17" name="pis_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_pis"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="cofins_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_cofins"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="parent_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sale_item_parent_item_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sale_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sale_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sale_token" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="sale_token_id" foreignKey="sale_sale_token_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sale_token_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="'available'::sale_token_status" digits="0" id="2" name="status" nullable="true" remarks="" size="2147483647" type="sale_token_status"/>
         <column autoUpdated="false" digits="0" id="3" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sale_token_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sale_token_code_key" unique="true">
            <column ascending="true" name="code"/>
         </index>
         <index name="sale_token_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sales_person" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="salesperson_id" foreignKey="sale_salesperson_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sales_person_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="2" id="2" name="comission" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="3" name="comission_type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="5" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sales_person_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sales_person_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sales_person_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="sales_person_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sellable" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="sellable_id" foreignKey="client_category_price_sellable_id_fkey" implied="false" onDeleteCascade="false" table="client_category_price"/>
            <child column="sellable_id" foreignKey="commission_source_sellable_id_fkey" implied="false" onDeleteCascade="false" table="commission_source"/>
            <child column="sellable_id" foreignKey="loan_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
            <child column="id" foreignKey="product_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
            <child column="sellable_id" foreignKey="product_history_sellable_id_fkey" implied="false" onDeleteCascade="false" table="product_history"/>
            <child column="sellable_id" foreignKey="purchase_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
            <child column="sellable_id" foreignKey="receiving_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
            <child column="sellable_id" foreignKey="returned_sale_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="sellable_id" foreignKey="sale_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="id" foreignKey="service_id_fkey" implied="false" onDeleteCascade="false" table="service"/>
            <child column="sellable_id" foreignKey="stock_decrease_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="sellable_id" foreignKey="transfer_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
            <child column="sellable_id" foreignKey="work_order_sellable_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="sellable_id" foreignKey="work_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="work_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sellable_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="barcode" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="code" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="status" nullable="false" remarks="" size="2147483647" type="sellable_status"/>
         <column autoUpdated="false" digits="0" id="5" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="8" id="6" name="cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="7" name="base_price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="8" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="9" name="max_discount" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="10" name="commission" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="11" name="on_sale_price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="12" name="on_sale_start_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="13" name="on_sale_end_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="14" name="image_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_image_id_fkey" implied="false" onDeleteCascade="false" table="image"/>
         </column>
         <column autoUpdated="false" digits="0" id="15" name="unit_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_unit_id_fkey" implied="false" onDeleteCascade="false" table="sellable_unit"/>
         </column>
         <column autoUpdated="false" digits="0" id="16" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_category_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="17" name="tax_constant_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_tax_constant_id_fkey" implied="false" onDeleteCascade="false" table="sellable_tax_constant"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="default_sale_cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_default_sale_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sellable_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sellable_description_idx" unique="false">
            <column ascending="true" name="description"/>
         </index>
         <index name="sellable_description_normalized_idx" unique="false"/>
         <index name="sellable_image_id_key" unique="true">
            <column ascending="true" name="image_id"/>
         </index>
         <index name="sellable_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sellable_category" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="category_id" foreignKey="commission_source_category_id_fkey" implied="false" onDeleteCascade="false" table="commission_source"/>
            <child column="category_id" foreignKey="sellable_category_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
            <child column="category_id" foreignKey="sellable_category_category_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sellable_category_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="3" name="suggested_markup" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="salesperson_commission" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_category_category_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="tax_constant_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="sellable_category_tax_constant_id_fkey" implied="false" onDeleteCascade="false" table="sellable_tax_constant"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sellable_category_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sellable_category_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sellable_tax_constant" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="tax_constant_id" foreignKey="sellable_tax_constant_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
            <child column="tax_constant_id" foreignKey="sellable_category_tax_constant_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sellable_tax_constant_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="tax_type" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="2" id="4" name="tax_value" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sellable_tax_constant_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sellable_tax_constant_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="sellable_unit" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="unit_id" foreignKey="sellable_unit_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="sellable_unit_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="unit_index" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="4" name="allow_fraction" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="sellable_unit_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sellable_unit_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="service" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="service_id" foreignKey="production_service_service_id_fkey" implied="false" onDeleteCascade="false" table="production_service"/>
            <parent column="id" foreignKey="service_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="service_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="service_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="service_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="stock_decrease" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="stock_decrease_id" foreignKey="stock_decrease_item_stock_decrease_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="stock_decrease_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('stock_decrease_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="confirm_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="4" name="status" nullable="false" remarks="" size="2147483647" type="stock_decrease_status"/>
         <column autoUpdated="false" digits="0" id="5" name="reason" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="removed_by_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_removed_by_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="cfop_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_cfop_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
         </column>
         <column autoUpdated="false" digits="0" id="12" name="group_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_group_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
         </column>
         <column autoUpdated="false" digits="0" id="13" name="cost_center_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_cost_center_id_fkey" implied="false" onDeleteCascade="false" table="cost_center"/>
         </column>
         <column autoUpdated="false" digits="0" id="14" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="15" name="invoice_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_invoice_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="stock_decrease_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="stock_decrease_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="stock_decrease_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="stock_decrease_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="stock_decrease_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="8" id="3" name="cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="4" name="stock_decrease_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_stock_decrease_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="icms_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="ipi_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="pis_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_pis"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="cofins_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_decrease_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_cofins"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="stock_decrease_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="stock_decrease_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="stock_transaction_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="stock_transaction_id" foreignKey="cost_center_entry_stock_transaction_id_fkey" implied="false" onDeleteCascade="false" table="cost_center_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="stock_transaction_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="8" id="3" name="stock_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="4" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="type" nullable="false" remarks="" size="2147483647" type="stock_transaction_history_type"/>
         <column autoUpdated="false" digits="0" id="6" name="object_id" nullable="true" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" digits="0" id="7" name="responsible_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_transaction_history_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="storable_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_transaction_history_storable_id_fkey" implied="false" onDeleteCascade="false" table="storable"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_transaction_history_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="stock_transaction_history_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="8" id="11" name="unit_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="stock_transaction_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="stock_transaction_history_branch_storable_batch_idx" unique="false">
            <column ascending="true" name="branch_id"/>
            <column ascending="true" name="storable_id"/>
            <column ascending="true" name="batch_id"/>
         </index>
         <index name="stock_transaction_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="storable" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="storable_id" foreignKey="product_stock_item_storable_id_fkey" implied="false" onDeleteCascade="false" table="product_stock_item"/>
            <child column="storable_id" foreignKey="stock_transaction_history_storable_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
            <child column="storable_id" foreignKey="storable_batch_storable_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
            <parent column="id" foreignKey="storable_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="storable_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="2" name="is_batch" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="3" name="minimum_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="3" id="4" name="maximum_quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="storable_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="storable_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="storable_batch" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="batch_id" foreignKey="inventory_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="inventory_item"/>
            <child column="batch_id" foreignKey="loan_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
            <child column="batch_id" foreignKey="product_stock_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="product_stock_item"/>
            <child column="batch_id" foreignKey="receiving_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
            <child column="batch_id" foreignKey="returned_sale_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="batch_id" foreignKey="sale_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="batch_id" foreignKey="stock_decrease_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="batch_id" foreignKey="stock_transaction_history_batch_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
            <child column="batch_id" foreignKey="transfer_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
            <child column="batch_id" foreignKey="work_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="work_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="storable_batch_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="batch_number" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="3" name="create_date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="expire_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="5" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="storable_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="storable_batch_storable_id_fkey" implied="false" onDeleteCascade="false" table="storable"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="storable_batch_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="storable_batch_batch_number_key" unique="true">
            <column ascending="true" name="batch_number"/>
         </index>
         <index name="storable_batch_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="supplier" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="supplier_id" foreignKey="product_supplier_info_supplier_id_fkey" implied="false" onDeleteCascade="false" table="product_supplier_info"/>
            <child column="supplier_id" foreignKey="purchase_order_supplier_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="supplier_id" foreignKey="receiving_order_supplier_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="supplier_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="supplier_status"/>
         <column autoUpdated="false" digits="0" id="4" name="product_desc" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="supplier_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="supplier_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="supplier_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="supplier_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="system_table" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('system_table_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="bigserial"/>
         <column autoUpdated="false" digits="6" id="1" name="updated" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="2" name="patchlevel" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="generation" nullable="true" remarks="" size="10" type="int4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="system_table_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="till" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="till_id" foreignKey="till_entry_till_id_fkey" implied="false" onDeleteCascade="false" table="till_entry"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="till_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="status" nullable="false" remarks="" size="2147483647" type="till_status"/>
         <column autoUpdated="false" digits="2" id="3" name="initial_cash_amount" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="final_cash_amount" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="5" name="opening_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="6" name="closing_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="7" name="station_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_station_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="observations" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="9" name="responsible_open_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_responsible_open_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="responsible_close_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_responsible_close_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="till_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="till_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="till_entry" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="till_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('till_entry_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="5" name="value" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="6" name="till_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_entry_till_id_fkey" implied="false" onDeleteCascade="false" table="till"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_entry_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="payment_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="till_entry_payment_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="till_entry_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="till_entry_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="till_entry_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="transaction_entry" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('transaction_entry_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="bigserial">
            <child column="te_id" foreignKey="account_te_id_fkey" implied="false" onDeleteCascade="false" table="account"/>
            <child column="te_id" foreignKey="account_transaction_te_id_fkey" implied="false" onDeleteCascade="false" table="account_transaction"/>
            <child column="te_id" foreignKey="address_te_id_fkey" implied="false" onDeleteCascade="false" table="address"/>
            <child column="te_id" foreignKey="attachment_te_id_fkey" implied="false" onDeleteCascade="false" table="attachment"/>
            <child column="te_id" foreignKey="bank_account_te_id_fkey" implied="false" onDeleteCascade="false" table="bank_account"/>
            <child column="te_id" foreignKey="bill_option_te_id_fkey" implied="false" onDeleteCascade="false" table="bill_option"/>
            <child column="te_id" foreignKey="branch_te_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
            <child column="te_id" foreignKey="branch_station_te_id_fkey" implied="false" onDeleteCascade="false" table="branch_station"/>
            <child column="te_id" foreignKey="calls_te_id_fkey" implied="false" onDeleteCascade="false" table="calls"/>
            <child column="te_id" foreignKey="card_operation_cost_te_id_fkey" implied="false" onDeleteCascade="false" table="card_operation_cost"/>
            <child column="te_id" foreignKey="card_payment_device_te_id_fkey" implied="false" onDeleteCascade="false" table="card_payment_device"/>
            <child column="te_id" foreignKey="cfop_data_te_id_fkey" implied="false" onDeleteCascade="false" table="cfop_data"/>
            <child column="te_id" foreignKey="check_data_te_id_fkey" implied="false" onDeleteCascade="false" table="check_data"/>
            <child column="te_id" foreignKey="client_te_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
            <child column="te_id" foreignKey="client_category_te_id_fkey" implied="false" onDeleteCascade="false" table="client_category"/>
            <child column="te_id" foreignKey="client_category_price_te_id_fkey" implied="false" onDeleteCascade="false" table="client_category_price"/>
            <child column="te_id" foreignKey="client_salary_history_te_id_fkey" implied="false" onDeleteCascade="false" table="client_salary_history"/>
            <child column="te_id" foreignKey="commission_te_id_fkey" implied="false" onDeleteCascade="false" table="commission"/>
            <child column="te_id" foreignKey="commission_source_te_id_fkey" implied="false" onDeleteCascade="false" table="commission_source"/>
            <child column="te_id" foreignKey="company_te_id_fkey" implied="false" onDeleteCascade="false" table="company"/>
            <child column="te_id" foreignKey="contact_info_te_id_fkey" implied="false" onDeleteCascade="false" table="contact_info"/>
            <child column="te_id" foreignKey="cost_center_te_id_fkey" implied="false" onDeleteCascade="false" table="cost_center"/>
            <child column="te_id" foreignKey="cost_center_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="cost_center_entry"/>
            <child column="te_id" foreignKey="credit_card_data_te_id_fkey" implied="false" onDeleteCascade="false" table="credit_card_data"/>
            <child column="te_id" foreignKey="credit_check_history_te_id_fkey" implied="false" onDeleteCascade="false" table="credit_check_history"/>
            <child column="te_id" foreignKey="credit_provider_te_id_fkey" implied="false" onDeleteCascade="false" table="credit_provider"/>
            <child column="te_id" foreignKey="delivery_te_id_fkey" implied="false" onDeleteCascade="false" table="delivery"/>
            <child column="te_id" foreignKey="device_constant_te_id_fkey" implied="false" onDeleteCascade="false" table="device_constant"/>
            <child column="te_id" foreignKey="device_settings_te_id_fkey" implied="false" onDeleteCascade="false" table="device_settings"/>
            <child column="te_id" foreignKey="employee_te_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
            <child column="te_id" foreignKey="employee_role_te_id_fkey" implied="false" onDeleteCascade="false" table="employee_role"/>
            <child column="te_id" foreignKey="employee_role_history_te_id_fkey" implied="false" onDeleteCascade="false" table="employee_role_history"/>
            <child column="te_id" foreignKey="fiscal_book_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_book_entry"/>
            <child column="te_id" foreignKey="fiscal_day_history_te_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_day_history"/>
            <child column="te_id" foreignKey="fiscal_day_tax_te_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_day_tax"/>
            <child column="te_id" foreignKey="fiscal_sale_history_te_id_fkey" implied="false" onDeleteCascade="false" table="fiscal_sale_history"/>
            <child column="te_id" foreignKey="grid_attribute_te_id_fkey" implied="false" onDeleteCascade="false" table="grid_attribute"/>
            <child column="te_id" foreignKey="grid_group_te_id_fkey" implied="false" onDeleteCascade="false" table="grid_group"/>
            <child column="te_id" foreignKey="grid_option_te_id_fkey" implied="false" onDeleteCascade="false" table="grid_option"/>
            <child column="te_id" foreignKey="image_te_id_fkey" implied="false" onDeleteCascade="false" table="image"/>
            <child column="te_id" foreignKey="individual_te_id_fkey" implied="false" onDeleteCascade="false" table="individual"/>
            <child column="te_id" foreignKey="installed_plugin_te_id_fkey" implied="false" onDeleteCascade="false" table="installed_plugin"/>
            <child column="te_id" foreignKey="inventory_te_id_fkey" implied="false" onDeleteCascade="false" table="inventory"/>
            <child column="te_id" foreignKey="inventory_item_te_id_fkey" implied="false" onDeleteCascade="false" table="inventory_item"/>
            <child column="te_id" foreignKey="invoice_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
            <child column="te_id" foreignKey="invoice_field_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_field"/>
            <child column="te_id" foreignKey="invoice_item_cofins_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_cofins"/>
            <child column="te_id" foreignKey="invoice_item_icms_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
            <child column="te_id" foreignKey="invoice_item_ipi_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
            <child column="te_id" foreignKey="invoice_item_pis_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_pis"/>
            <child column="te_id" foreignKey="invoice_layout_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_layout"/>
            <child column="te_id" foreignKey="invoice_printer_te_id_fkey" implied="false" onDeleteCascade="false" table="invoice_printer"/>
            <child column="te_id" foreignKey="loan_te_id_fkey" implied="false" onDeleteCascade="false" table="loan"/>
            <child column="te_id" foreignKey="loan_item_te_id_fkey" implied="false" onDeleteCascade="false" table="loan_item"/>
            <child column="te_id" foreignKey="login_user_te_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
            <child column="te_id" foreignKey="military_data_te_id_fkey" implied="false" onDeleteCascade="false" table="military_data"/>
            <child column="te_id" foreignKey="parameter_data_te_id_fkey" implied="false" onDeleteCascade="false" table="parameter_data"/>
            <child column="te_id" foreignKey="payment_te_id_fkey" implied="false" onDeleteCascade="false" table="payment"/>
            <child column="te_id" foreignKey="payment_category_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_category"/>
            <child column="te_id" foreignKey="payment_change_history_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_change_history"/>
            <child column="te_id" foreignKey="payment_comment_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_comment"/>
            <child column="te_id" foreignKey="payment_flow_history_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_flow_history"/>
            <child column="te_id" foreignKey="payment_group_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_group"/>
            <child column="te_id" foreignKey="payment_method_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_method"/>
            <child column="te_id" foreignKey="payment_renegotiation_te_id_fkey" implied="false" onDeleteCascade="false" table="payment_renegotiation"/>
            <child column="te_id" foreignKey="person_te_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
            <child column="te_id" foreignKey="plugin_egg_te_id_fkey" implied="false" onDeleteCascade="false" table="plugin_egg"/>
            <child column="te_id" foreignKey="product_te_id_fkey" implied="false" onDeleteCascade="false" table="product"/>
            <child column="te_id" foreignKey="product_attribute_te_id_fkey" implied="false" onDeleteCascade="false" table="product_attribute"/>
            <child column="te_id" foreignKey="product_cofins_template_te_id_fkey" implied="false" onDeleteCascade="false" table="product_cofins_template"/>
            <child column="te_id" foreignKey="product_component_te_id_fkey" implied="false" onDeleteCascade="false" table="product_component"/>
            <child column="te_id" foreignKey="product_history_te_id_fkey" implied="false" onDeleteCascade="false" table="product_history"/>
            <child column="te_id" foreignKey="product_icms_template_te_id_fkey" implied="false" onDeleteCascade="false" table="product_icms_template"/>
            <child column="te_id" foreignKey="product_ipi_template_te_id_fkey" implied="false" onDeleteCascade="false" table="product_ipi_template"/>
            <child column="te_id" foreignKey="product_manufacturer_te_id_fkey" implied="false" onDeleteCascade="false" table="product_manufacturer"/>
            <child column="te_id" foreignKey="product_option_map_te_id_fkey" implied="false" onDeleteCascade="false" table="product_option_map"/>
            <child column="te_id" foreignKey="product_pis_template_te_id_fkey" implied="false" onDeleteCascade="false" table="product_pis_template"/>
            <child column="te_id" foreignKey="product_quality_test_te_id_fkey" implied="false" onDeleteCascade="false" table="product_quality_test"/>
            <child column="te_id" foreignKey="product_stock_item_te_id_fkey" implied="false" onDeleteCascade="false" table="product_stock_item"/>
            <child column="te_id" foreignKey="product_supplier_info_te_id_fkey" implied="false" onDeleteCascade="false" table="product_supplier_info"/>
            <child column="te_id" foreignKey="product_tax_template_te_id_fkey" implied="false" onDeleteCascade="false" table="product_tax_template"/>
            <child column="te_id" foreignKey="production_item_te_id_fkey" implied="false" onDeleteCascade="false" table="production_item"/>
            <child column="te_id" foreignKey="production_item_quality_result_te_id_fkey" implied="false" onDeleteCascade="false" table="production_item_quality_result"/>
            <child column="te_id" foreignKey="production_material_te_id_fkey" implied="false" onDeleteCascade="false" table="production_material"/>
            <child column="te_id" foreignKey="production_order_te_id_fkey" implied="false" onDeleteCascade="false" table="production_order"/>
            <child column="te_id" foreignKey="production_produced_item_te_id_fkey" implied="false" onDeleteCascade="false" table="production_produced_item"/>
            <child column="te_id" foreignKey="production_service_te_id_fkey" implied="false" onDeleteCascade="false" table="production_service"/>
            <child column="te_id" foreignKey="profile_settings_te_id_fkey" implied="false" onDeleteCascade="false" table="profile_settings"/>
            <child column="te_id" foreignKey="purchase_item_te_id_fkey" implied="false" onDeleteCascade="false" table="purchase_item"/>
            <child column="te_id" foreignKey="purchase_order_te_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="te_id" foreignKey="purchase_receiving_map_te_id_fkey" implied="false" onDeleteCascade="false" table="purchase_receiving_map"/>
            <child column="te_id" foreignKey="quotation_te_id_fkey" implied="false" onDeleteCascade="false" table="quotation"/>
            <child column="te_id" foreignKey="quote_group_te_id_fkey" implied="false" onDeleteCascade="false" table="quote_group"/>
            <child column="te_id" foreignKey="receiving_order_te_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
            <child column="te_id" foreignKey="receiving_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order_item"/>
            <child column="te_id" foreignKey="returned_sale_te_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale"/>
            <child column="te_id" foreignKey="returned_sale_item_te_id_fkey" implied="false" onDeleteCascade="false" table="returned_sale_item"/>
            <child column="te_id" foreignKey="sale_te_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
            <child column="te_id" foreignKey="sale_comment_te_id_fkey" implied="false" onDeleteCascade="false" table="sale_comment"/>
            <child column="te_id" foreignKey="sale_item_te_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
            <child column="te_id" foreignKey="sale_token_te_id_fkey" implied="false" onDeleteCascade="false" table="sale_token"/>
            <child column="te_id" foreignKey="sales_person_te_id_fkey" implied="false" onDeleteCascade="false" table="sales_person"/>
            <child column="te_id" foreignKey="sellable_te_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
            <child column="te_id" foreignKey="sellable_category_te_id_fkey" implied="false" onDeleteCascade="false" table="sellable_category"/>
            <child column="te_id" foreignKey="sellable_tax_constant_te_id_fkey" implied="false" onDeleteCascade="false" table="sellable_tax_constant"/>
            <child column="te_id" foreignKey="sellable_unit_te_id_fkey" implied="false" onDeleteCascade="false" table="sellable_unit"/>
            <child column="te_id" foreignKey="service_te_id_fkey" implied="false" onDeleteCascade="false" table="service"/>
            <child column="te_id" foreignKey="stock_decrease_te_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease"/>
            <child column="te_id" foreignKey="stock_decrease_item_te_id_fkey" implied="false" onDeleteCascade="false" table="stock_decrease_item"/>
            <child column="te_id" foreignKey="stock_transaction_history_te_id_fkey" implied="false" onDeleteCascade="false" table="stock_transaction_history"/>
            <child column="te_id" foreignKey="storable_te_id_fkey" implied="false" onDeleteCascade="false" table="storable"/>
            <child column="te_id" foreignKey="storable_batch_te_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
            <child column="te_id" foreignKey="supplier_te_id_fkey" implied="false" onDeleteCascade="false" table="supplier"/>
            <child column="te_id" foreignKey="till_te_id_fkey" implied="false" onDeleteCascade="false" table="till"/>
            <child column="te_id" foreignKey="till_entry_te_id_fkey" implied="false" onDeleteCascade="false" table="till_entry"/>
            <child column="te_id" foreignKey="transfer_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
            <child column="te_id" foreignKey="transfer_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
            <child column="te_id" foreignKey="transporter_te_id_fkey" implied="false" onDeleteCascade="false" table="transporter"/>
            <child column="te_id" foreignKey="ui_field_te_id_fkey" implied="false" onDeleteCascade="false" table="ui_field"/>
            <child column="te_id" foreignKey="ui_form_te_id_fkey" implied="false" onDeleteCascade="false" table="ui_form"/>
            <child column="te_id" foreignKey="user_branch_access_te_id_fkey" implied="false" onDeleteCascade="false" table="user_branch_access"/>
            <child column="te_id" foreignKey="user_profile_te_id_fkey" implied="false" onDeleteCascade="false" table="user_profile"/>
            <child column="te_id" foreignKey="voter_data_te_id_fkey" implied="false" onDeleteCascade="false" table="voter_data"/>
            <child column="te_id" foreignKey="work_order_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
            <child column="te_id" foreignKey="work_order_category_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order_category"/>
            <child column="te_id" foreignKey="work_order_history_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order_history"/>
            <child column="te_id" foreignKey="work_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order_item"/>
            <child column="te_id" foreignKey="work_order_package_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
            <child column="te_id" foreignKey="work_order_package_item_te_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package_item"/>
            <child column="te_id" foreignKey="work_permit_data_te_id_fkey" implied="false" onDeleteCascade="false" table="work_permit_data"/>
         </column>
         <column autoUpdated="false" digits="6" id="1" name="te_time" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="2" name="dirty" nullable="true" remarks="" size="1" type="bool"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="transaction_entry_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="transfer_order" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="transfer_order_id" foreignKey="transfer_order_item_transfer_order_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="transfer_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('transfer_order_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="6" id="3" name="open_date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="4" name="receival_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="5" name="status" nullable="false" remarks="" size="2147483647" type="transfer_order_status"/>
         <column autoUpdated="false" digits="0" id="6" name="source_branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_source_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="destination_branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_destination_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="source_responsible_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_source_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="destination_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_destination_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="invoice_number" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="11" name="comments" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="invoice_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_invoice_id_fkey" implied="false" onDeleteCascade="false" table="invoice"/>
         </column>
         <column autoUpdated="false" digits="6" id="13" name="cancel_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="14" name="cancel_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_cancel_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="transfer_order_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="transfer_order_identifier_source_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="source_branch_id"/>
         </index>
         <index name="transfer_order_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="transfer_order_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="transfer_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="sellable_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="transfer_order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_transfer_order_id_fkey" implied="false" onDeleteCascade="false" table="transfer_order"/>
         </column>
         <column autoUpdated="false" digits="3" id="5" name="quantity" nullable="false" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" defaultValue="0" digits="8" id="6" name="stock_cost" nullable="false" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="7" name="icms_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_icms_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_icms"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="ipi_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_ipi_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_ipi"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="pis_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_pis_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_pis"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="cofins_info_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transfer_order_item_cofins_info_id_fkey" implied="false" onDeleteCascade="false" table="invoice_item_cofins"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="transfer_order_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="transfer_order_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="transporter" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="transporter_id" foreignKey="delivery_transporter_id_fkey" implied="false" onDeleteCascade="false" table="delivery"/>
            <child column="transporter_id" foreignKey="purchase_order_transporter_id_fkey" implied="false" onDeleteCascade="false" table="purchase_order"/>
            <child column="transporter_id" foreignKey="receiving_order_transporter_id_fkey" implied="false" onDeleteCascade="false" table="receiving_order"/>
            <child column="transporter_id" foreignKey="sale_transporter_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="transporter_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="is_active" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="6" id="3" name="open_contract_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="2" id="4" name="freight_percentage" nullable="false" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="person_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="transporter_person_id_fkey" implied="false" onDeleteCascade="false" table="person"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="transporter_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="transporter_person_id_key" unique="true">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="transporter_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="ui_field" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="ui_field_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="field_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="mandatory" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="5" name="visible" nullable="true" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="6" name="ui_form_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="ui_field_ui_form_id_fkey" implied="false" onDeleteCascade="false" table="ui_form"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="ui_field_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ui_field_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="ui_form" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="ui_form_id" foreignKey="ui_field_ui_form_id_fkey" implied="false" onDeleteCascade="false" table="ui_field"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="ui_form_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="form_name" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="ui_form_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ui_form_form_name_key" unique="true">
            <column ascending="true" name="form_name"/>
         </index>
         <index name="ui_form_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="user_branch_access" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="user_branch_access_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="user_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="user_branch_access_user_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="user_branch_access_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="user_branch_access_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="user_branch_access_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
         <index name="user_branch_access_user_id_branch_id_key" unique="true">
            <column ascending="true" name="user_id"/>
            <column ascending="true" name="branch_id"/>
         </index>
      </table>
      <table name="user_profile" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="profile_id" foreignKey="login_user_profile_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
            <child column="user_profile_id" foreignKey="profile_settings_user_profile_id_fkey" implied="false" onDeleteCascade="false" table="profile_settings"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="user_profile_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="2" id="3" name="max_discount" nullable="true" remarks="" size="10" type="numeric"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="user_profile_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="user_profile_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="voter_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="voter_data_id" foreignKey="employee_voter_data_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="voter_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="section" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="zone" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="voter_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="voter_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="work_order_id" foreignKey="work_order_history_work_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order_history"/>
            <child column="order_id" foreignKey="work_order_item_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order_item"/>
            <child column="order_id" foreignKey="work_order_package_item_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="true" defaultValue="nextval('work_order_identifier_seq'::regclass)" digits="0" id="2" name="identifier" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="work_order_status"/>
         <column autoUpdated="false" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="2" id="5" name="estimated_hours" nullable="true" remarks="" size="10" type="numeric"/>
         <column autoUpdated="false" digits="2" id="6" name="estimated_cost" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="6" id="7" name="estimated_start" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="8" name="estimated_finish" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="9" name="open_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="10" name="approve_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="11" name="finish_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="12" name="is_rejected" nullable="false" remarks="" size="1" type="bool"/>
         <column autoUpdated="false" digits="0" id="13" name="defect_reported" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="14" name="defect_detected" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="15" name="branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="16" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="17" name="quote_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_quote_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="18" name="execution_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_execution_responsible_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" digits="0" id="19" name="category_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_category_id_fkey" implied="false" onDeleteCascade="false" table="work_order_category"/>
         </column>
         <column autoUpdated="false" digits="0" id="20" name="client_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_client_id_fkey" implied="false" onDeleteCascade="false" table="client"/>
         </column>
         <column autoUpdated="false" digits="0" id="21" name="sale_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_sale_id_fkey" implied="false" onDeleteCascade="false" table="sale"/>
         </column>
         <column autoUpdated="false" digits="0" id="22" name="current_branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_current_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="23" name="execution_branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_execution_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="24" name="quantity" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="25" name="supplier_order" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_identifier_branch_id_key" unique="true">
            <column ascending="true" name="identifier"/>
            <column ascending="true" name="branch_id"/>
         </index>
         <index name="work_order_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order_category" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="category_id" foreignKey="work_order_category_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_category_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="color" nullable="true" remarks="" size="2147483647" type="text"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_category_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_category_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
         <index name="work_order_category_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order_history" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_history_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="6" id="2" name="date" nullable="false" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="3" name="what" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="old_value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="new_value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="user_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_history_user_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="work_order_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_history_work_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_history_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_history_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="3" id="2" name="quantity" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="3" id="3" name="quantity_decreased" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="price" nullable="true" remarks="" size="20" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="sellable_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_item_sellable_id_fkey" implied="false" onDeleteCascade="false" table="sellable"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="batch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_item_batch_id_fkey" implied="false" onDeleteCascade="false" table="storable_batch"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="sale_item_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_item_sale_item_id_fkey" implied="false" onDeleteCascade="false" table="sale_item"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="order_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_item_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order_package" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="package_id" foreignKey="work_order_package_item_package_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package_item"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_package_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="identifier" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="status" nullable="false" remarks="" size="2147483647" type="work_order_package_status"/>
         <column autoUpdated="false" digits="6" id="4" name="send_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="6" id="5" name="receive_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <column autoUpdated="false" digits="0" id="6" name="send_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_send_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="receive_responsible_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_receive_responsible_id_fkey" implied="false" onDeleteCascade="false" table="login_user"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="destination_branch_id" nullable="true" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_destination_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="source_branch_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_source_branch_id_fkey" implied="false" onDeleteCascade="false" table="branch"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_package_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_package_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_order_package_item" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid"/>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_order_package_item_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="order_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_item_order_id_fkey" implied="false" onDeleteCascade="false" table="work_order"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="package_id" nullable="false" remarks="" size="2147483647" type="uuid">
            <parent column="id" foreignKey="work_order_package_item_package_id_fkey" implied="false" onDeleteCascade="false" table="work_order_package"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_order_package_item_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_order_package_item_order_id_package_id_key" unique="true">
            <column ascending="true" name="order_id"/>
            <column ascending="true" name="package_id"/>
         </index>
         <index name="work_order_package_item_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
      <table name="work_permit_data" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" defaultValue="uuid_generate_v1()" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="uuid">
            <child column="workpermit_data_id" foreignKey="employee_workpermit_data_id_fkey" implied="false" onDeleteCascade="false" table="employee"/>
         </column>
         <column autoUpdated="false" defaultValue="new_te()" digits="0" id="1" name="te_id" nullable="true" remarks="" size="19" type="int8">
            <parent column="id" foreignKey="work_permit_data_te_id_fkey" implied="false" onDeleteCascade="false" table="transaction_entry"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="series_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="pis_number" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="pis_bank" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="6" id="6" name="pis_registry_date" nullable="true" remarks="" size="29" type="timestamp"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="work_permit_data_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_permit_data_te_id_key" unique="true">
            <column ascending="true" name="te_id"/>
         </index>
      </table>
   </tables>
</database>
