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

@OdooModel("crm.lead", [["active", "=", true]])
export class Lead {

    @OdooField(FieldTypes.MANY2ONE)
    campaign_id: any;

    @OdooField(FieldTypes.MANY2MANY)
    categ_ids: any;

    @OdooField(FieldTypes.CHAR)
    city: string;

    @OdooField(FieldTypes.CHAR)
    color: string;

    @OdooField(FieldTypes.CHAR)
    contact_name: string;

    @OdooField(FieldTypes.DATETIME)
    create_date: string;

    @OdooField(FieldTypes.DATE)
    date_action: string;

    @OdooField(FieldTypes.DATETIME)
    date_action_last: string;

    @OdooField(FieldTypes.DATETIME)
    date_action_next: string;

    @OdooField(FieldTypes.DATETIME)
    date_closed: string;

    @OdooField(FieldTypes.DATE)
    date_deadline: string;

    @OdooField(FieldTypes.DATETIME)
    date_last_stage_update: string;

    @OdooField(FieldTypes.DATETIME)
    date_open: string;

    @OdooField(FieldTypes.FLOAT)
    day_close: number;

    @OdooField(FieldTypes.FLOAT)
    day_open: number;

    @OdooField(FieldTypes.CHAR)
    description: string;

    @OdooField(FieldTypes.CHAR)
    display_name: string;

    @OdooField(FieldTypes.CHAR)
    email_cc: string;

    @OdooField(FieldTypes.CHAR)
    email_from: string;

    @OdooField(FieldTypes.CHAR)
    fax: string;

    @OdooField(FieldTypes.CHAR)
    mobile: string;

    @OdooField(FieldTypes.CHAR)
    name: string;

    @OdooField(FieldTypes.CHAR)    
    partner_name: string

    @OdooField(FieldTypes.MANY2ONE)    
    partner_id: any;

    @OdooField(FieldTypes.CHAR)    
    phone: string;

    @OdooField(FieldTypes.SELECTION)    
    priority: string;

    @OdooField(FieldTypes.FLOAT)    
    probability: number;

    @OdooField(FieldTypes.MANY2ONE)    
    stage_id: any;

    @OdooField(FieldTypes.CHAR)    
    street: string;

    @OdooField(FieldTypes.CHAR)    
    street2: string;

    @OdooField(FieldTypes.CHAR)    
    title: string;

    @OdooField(FieldTypes.SELECTION)    
    type: string;
}