{
    "table": {
        "name": "ctb_patrimonio"
    },
    "attributes": {
        "filial": {
            "type": "integer"
        },
        "codigo": {
            "key": "primary",
            "type": "integer"
        },
        "descricao": {
            "type": "string",
            "maxlen": 500
        },
        "descricao_funcao": {
            "type": "string",
            "maxlen": 500
        },
        "localizacao": {
            "type": "string",
            "maxlen": 500
        },
        "situacao": {
            "type": "string",
            "maxlen": 1
        },
        "tipo": {
            "type": "string",
            "maxlen": 1
        },
        "conta_contabil": {
            "type": "integer"
        },
        "centro_custo": {
            "type": "integer"
        },
        "filial_for": {
            "type": "integer"
        },
        "fornecedor": {
            "type": "integer"
        },
        "serie": {
            "type": "string",
            "maxlen": 6
        },
        "nota": {
            "type": "integer"
        },
        "sequencia": {
            "type": "integer"
        },
        "data_aquisicao": {
            "type": "datetime"
        },
        "valor_aquisicao": {
            "type": "integer"
        },
        "valor_icms": {
            "type": "integer"
        },
        "valor_pis": {
            "type": "integer"
        },
        "valor_cofins": {
            "type": "integer"
        },
        "data_inicio_depreciacao": {
            "type": "datetime"
        },
        "valor_depreciado": {
            "type": "integer"
        },
        "data_inicio_apropriacao": {
            "type": "datetime"
        },
        "data_baixa": {
            "type": "datetime"
        },
        "data_ultimo_processamento": {
            "type": "datetime"
        },
        "percentual_depreciacao_ano": {
            "type": "integer"
        },
        "quantidade": {
            "type": "integer"
        },
        "nr_identificacao": {
            "type": "string",
            "maxlen": 30
        },
        "conta_contabil_depreciacao": {
            "type": "integer"
        },
        "produto": {
            "type": "integer"
        },
        "depreciacao_sn": {
            "type": "string",
            "maxlen": 1
        },
        "apropriacao_sn": {
            "type": "string",
            "maxlen": 1
        }
    },
    "originaltable": {
        "fullname": "public.ctb_patrimonio",
        "name": "ctb_patrimonio",
        "relationship": false,
        "columns": {
            "filial": {
                "position": 1,
                "name": "filial",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "filial",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "codigo": {
                "position": 2,
                "name": "codigo",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": null
            },
            "descricao": {
                "position": 3,
                "name": "descricao",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 500,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "descricao_funcao": {
                "position": 4,
                "name": "descricao_funcao",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 500,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "localizacao": {
                "position": 5,
                "name": "localizacao",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 500,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "situacao": {
                "position": 6,
                "name": "situacao",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 1,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "tipo": {
                "position": 7,
                "name": "tipo",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 1,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "conta_contabil": {
                "position": 8,
                "name": "conta_contabil",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 16,
                "radix": 10,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "conta_contabil",
                    "foreign_table_name": "ctb_conta_contabil",
                    "foreign_column_name": "codigo"
                }
            },
            "centro_custo": {
                "position": 9,
                "name": "centro_custo",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": null
            },
            "filial_for": {
                "position": 10,
                "name": "filial_for",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "filial_for",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "fornecedor": {
                "position": 11,
                "name": "fornecedor",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "fornecedor",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "serie": {
                "position": 12,
                "name": "serie",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 6,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": {
                    "column_name": "serie",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "nota": {
                "position": 13,
                "name": "nota",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "nota",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "sequencia": {
                "position": 14,
                "name": "sequencia",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "sequencia",
                    "foreign_table_name": "ent_nota_fiscal_item",
                    "foreign_column_name": "filial_nota"
                }
            },
            "data_aquisicao": {
                "position": 15,
                "name": "data_aquisicao",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "valor_aquisicao": {
                "position": 16,
                "name": "valor_aquisicao",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "valor_icms": {
                "position": 17,
                "name": "valor_icms",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "valor_pis": {
                "position": 18,
                "name": "valor_pis",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "valor_cofins": {
                "position": 19,
                "name": "valor_cofins",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "data_inicio_depreciacao": {
                "position": 20,
                "name": "data_inicio_depreciacao",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "valor_depreciado": {
                "position": 21,
                "name": "valor_depreciado",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "data_inicio_apropriacao": {
                "position": 22,
                "name": "data_inicio_apropriacao",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "data_baixa": {
                "position": 23,
                "name": "data_baixa",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "data_ultimo_processamento": {
                "position": 24,
                "name": "data_ultimo_processamento",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "percentual_depreciacao_ano": {
                "position": 25,
                "name": "percentual_depreciacao_ano",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "quantidade": {
                "position": 26,
                "name": "quantidade",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "nr_identificacao": {
                "position": 27,
                "name": "nr_identificacao",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 30,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "conta_contabil_depreciacao": {
                "position": 28,
                "name": "conta_contabil_depreciacao",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 16,
                "radix": 10,
                "scale": 0,
                "interval": null,
                "foreignkey": null
            },
            "produto": {
                "position": 29,
                "name": "produto",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": null
            },
            "depreciacao_sn": {
                "position": 30,
                "name": "depreciacao_sn",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 1,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "apropriacao_sn": {
                "position": 31,
                "name": "apropriacao_sn",
                "type": "character varying",
                "nullable": "NO",
                "maxlen": 1,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            }
        },
        "constraints": [],
        "relationships": {
            "one-to-one": [],
            "one-to-many": [],
            "many-to-one": [
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "sequencia"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "conta_contabil",
                    "to": "ctb_conta_contabil",
                    "to_attribute": "codigo"
                },
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "numero"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "serie"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "fornecedor"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_for"
                },
                {
                    "name": "filial",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                },
                {
                    "name": "filial_for",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                },
                {
                    "name": "fornecedor",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                },
                {
                    "name": "serie",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                },
                {
                    "name": "nota",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                },
                {
                    "name": "sequencia",
                    "to": "ent_nota_fiscal_item",
                    "to_attribute": "filial_nota"
                }
            ],
            "many-to-many": []
        },
        "foreignkeys": [
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "sequencia"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "conta_contabil",
                "foreign_table_name": "ctb_conta_contabil",
                "foreign_column_name": "codigo"
            },
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "numero"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "serie"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "fornecedor"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_for"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            },
            {
                "column_name": "filial_for",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            },
            {
                "column_name": "fornecedor",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            },
            {
                "column_name": "serie",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            },
            {
                "column_name": "nota",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            },
            {
                "column_name": "sequencia",
                "foreign_table_name": "ent_nota_fiscal_item",
                "foreign_column_name": "filial_nota"
            }
        ]
    }
}