{
    "table": {
        "name": "prc_calculo_preco_custo"
    },
    "attributes": {
        "filial": {
            "type": "integer"
        },
        "produto": {
            "type": "integer"
        },
        "data": {
            "type": "datetime"
        },
        "preco_moeda_estrangeira": {
            "type": "integer"
        },
        "perc_paridade_cambial": {
            "type": "integer"
        },
        "perc_frete": {
            "type": "integer"
        },
        "perc_seguro": {
            "type": "integer"
        },
        "custo_cif": {
            "type": "integer"
        },
        "perc_ii": {
            "type": "integer"
        },
        "perc_ipi": {
            "type": "integer"
        },
        "perc_icms": {
            "type": "integer"
        },
        "perc_pis": {
            "type": "integer"
        },
        "perc_cofins": {
            "type": "integer"
        },
        "custo_direto": {
            "type": "integer"
        },
        "perc_custo_indireto": {
            "type": "integer"
        },
        "custo_total": {
            "type": "integer"
        },
        "perc_vnd_markup": {
            "type": "integer"
        },
        "preco_vnd_venda": {
            "type": "integer"
        },
        "perc_vnd_comiss_vend": {
            "type": "integer"
        },
        "perc_vnd_icms": {
            "type": "integer"
        },
        "perc_vnd_pis": {
            "type": "integer"
        },
        "perc_vnd_cofins": {
            "type": "integer"
        },
        "perc_vnd_custo_fixo": {
            "type": "integer"
        },
        "perc_vnd_adm": {
            "type": "integer"
        },
        "perc_vnd_ger": {
            "type": "integer"
        },
        "perc_vnd_frete": {
            "type": "integer"
        },
        "perc_vnd_ir15": {
            "type": "integer"
        },
        "perc_vnd_ir10": {
            "type": "integer"
        },
        "perc_vnd_cssl": {
            "type": "integer"
        },
        "custo_vnd": {
            "type": "integer"
        },
        "valor_vnd_lucro": {
            "type": "integer"
        },
        "perc_vnd_lucro": {
            "type": "integer"
        }
    },
    "originaltable": {
        "fullname": "public.prc_calculo_preco_custo",
        "name": "prc_calculo_preco_custo",
        "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": "pro_produto",
                    "foreign_column_name": "codigo"
                }
            },
            "produto": {
                "position": 2,
                "name": "produto",
                "type": "integer",
                "nullable": "NO",
                "maxlen": null,
                "precision": 32,
                "radix": 2,
                "scale": 0,
                "interval": null,
                "foreignkey": {
                    "column_name": "produto",
                    "foreign_table_name": "pro_produto",
                    "foreign_column_name": "filial_pro"
                }
            },
            "data": {
                "position": 3,
                "name": "data",
                "type": "date",
                "nullable": "NO",
                "maxlen": null,
                "precision": null,
                "radix": null,
                "scale": null,
                "interval": null,
                "foreignkey": null
            },
            "preco_moeda_estrangeira": {
                "position": 4,
                "name": "preco_moeda_estrangeira",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_paridade_cambial": {
                "position": 5,
                "name": "perc_paridade_cambial",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_frete": {
                "position": 6,
                "name": "perc_frete",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_seguro": {
                "position": 7,
                "name": "perc_seguro",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "custo_cif": {
                "position": 8,
                "name": "custo_cif",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_ii": {
                "position": 9,
                "name": "perc_ii",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_ipi": {
                "position": 10,
                "name": "perc_ipi",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_icms": {
                "position": 11,
                "name": "perc_icms",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_pis": {
                "position": 12,
                "name": "perc_pis",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_cofins": {
                "position": 13,
                "name": "perc_cofins",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "custo_direto": {
                "position": 14,
                "name": "custo_direto",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_custo_indireto": {
                "position": 15,
                "name": "perc_custo_indireto",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "custo_total": {
                "position": 16,
                "name": "custo_total",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_markup": {
                "position": 17,
                "name": "perc_vnd_markup",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "preco_vnd_venda": {
                "position": 18,
                "name": "preco_vnd_venda",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_comiss_vend": {
                "position": 19,
                "name": "perc_vnd_comiss_vend",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_icms": {
                "position": 20,
                "name": "perc_vnd_icms",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_pis": {
                "position": 21,
                "name": "perc_vnd_pis",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_cofins": {
                "position": 22,
                "name": "perc_vnd_cofins",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_custo_fixo": {
                "position": 23,
                "name": "perc_vnd_custo_fixo",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_adm": {
                "position": 24,
                "name": "perc_vnd_adm",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_ger": {
                "position": 25,
                "name": "perc_vnd_ger",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_frete": {
                "position": 26,
                "name": "perc_vnd_frete",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_ir15": {
                "position": 27,
                "name": "perc_vnd_ir15",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_ir10": {
                "position": 28,
                "name": "perc_vnd_ir10",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_cssl": {
                "position": 29,
                "name": "perc_vnd_cssl",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "custo_vnd": {
                "position": 30,
                "name": "custo_vnd",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "valor_vnd_lucro": {
                "position": 31,
                "name": "valor_vnd_lucro",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            },
            "perc_vnd_lucro": {
                "position": 32,
                "name": "perc_vnd_lucro",
                "type": "numeric",
                "nullable": "NO",
                "maxlen": null,
                "precision": 18,
                "radix": 10,
                "scale": 6,
                "interval": null,
                "foreignkey": null
            }
        },
        "constraints": [],
        "relationships": {
            "one-to-one": [],
            "one-to-many": [],
            "many-to-one": [
                {
                    "name": "filial",
                    "to": "pro_produto",
                    "to_attribute": "filial_pro"
                },
                {
                    "name": "produto",
                    "to": "pro_produto",
                    "to_attribute": "codigo"
                },
                {
                    "name": "produto",
                    "to": "pro_produto",
                    "to_attribute": "filial_pro"
                },
                {
                    "name": "filial",
                    "to": "pro_produto",
                    "to_attribute": "codigo"
                }
            ],
            "many-to-many": []
        },
        "foreignkeys": [
            {
                "column_name": "filial",
                "foreign_table_name": "pro_produto",
                "foreign_column_name": "filial_pro"
            },
            {
                "column_name": "produto",
                "foreign_table_name": "pro_produto",
                "foreign_column_name": "codigo"
            },
            {
                "column_name": "produto",
                "foreign_table_name": "pro_produto",
                "foreign_column_name": "filial_pro"
            },
            {
                "column_name": "filial",
                "foreign_table_name": "pro_produto",
                "foreign_column_name": "codigo"
            }
        ]
    }
}