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

@OdooModel("product.product", [["sale_ok", "=", true], ["qty_available", ">", 0], ["active", "=", true]])
export class ProductProduct {

    @OdooField(FieldTypes.ONE2MANY)
    attribute_line_ids: any;

    @OdooField(FieldTypes.MANY2MANY)
    attribute_value_ids: any;

    @OdooField(FieldTypes.MANY2ONE)
    categ_id: any;

    @OdooField(FieldTypes.CHAR)
    code: string;

    @OdooField(FieldTypes.CHAR)
    default_code: string;

    @OdooField(FieldTypes.CHAR)
    display_name: string;

    @OdooField(FieldTypes.CHAR)
    ean13: string;

    @OdooField(FieldTypes.CHAR)
    image_medium: string;

    @OdooField(FieldTypes.CHAR)
    image_variant: string;

    @OdooField(FieldTypes.FLOAT)
    list_price: number;

    @OdooField(FieldTypes.CHAR)
    name: string;

    @OdooField(FieldTypes.CHAR)
    name_template: string;

    @OdooField(FieldTypes.FLOAT)
    price: number;

    @OdooField(FieldTypes.FLOAT)
    price_extra: number;

    @OdooField(FieldTypes.MANY2ONE)
    product_tmpl_id: number;

    @OdooField(FieldTypes.FLOAT)
    qty_available: number;
}
