import { OdooModel } from "../decorators/model";
import { OdooField } from "../decorators/field";
import { FieldTypes } from "../types/field";

@OdooModel("sale.order.line")
export class SaleOrderLine {

    @OdooField(FieldTypes.FLOAT)
    discount: number;

    @OdooField(FieldTypes.FLOAT)
    discounted_price: number;

    @OdooField(FieldTypes.CHAR)
    display_name: string;

    @OdooField(FieldTypes.CHAR)
    name: string;

    @OdooField(FieldTypes.MANY2ONE)
    order_id: any;

    @OdooField(FieldTypes.MANY2ONE)
    order_partner_id: any;

    @OdooField(FieldTypes.FLOAT)
    price_reduce: number;

    @OdooField(FieldTypes.FLOAT)
    price_subtotal: number;

    @OdooField(FieldTypes.FLOAT)
    price_unit: number;

    @OdooField(FieldTypes.MANY2ONE)
    product_id: any;

    @OdooField(FieldTypes.MANY2ONE)
    product_tmpl_id: any;

    @OdooField(FieldTypes.MANY2ONE)
    product_uom: any;

    @OdooField(FieldTypes.FLOAT)
    product_uom_qty: number;

    @OdooField(FieldTypes.MANY2ONE)
    product_uos: any;

    @OdooField(FieldTypes.FLOAT)
    product_uos_qty: number;

    @OdooField(FieldTypes.SELECTION)
    state: string;

    @OdooField(FieldTypes.MANY2MANY)
    tax_id: any;
}