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

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

    @OdooField(FieldTypes.ONE2MANY)
    attribute_line_ids: any;

    @OdooField(FieldTypes.MANY2ONE)
    categ_id: any;

    @OdooField(FieldTypes.MANY2ONE)
    company_id: any;

    @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.FLOAT)
    list_price: number;

    @OdooField(FieldTypes.CHAR)
    name: string;

    @OdooField(FieldTypes.FLOAT)
    price: number;

    @OdooField(FieldTypes.ONE2MANY)
    product_variant_ids: any;

    @OdooField(FieldTypes.FLOAT)
    qty_available: number;

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