package com.dayou.entity;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dayou.annotation.*;
import com.dayou.common.BaseEntity;
import java.time.LocalDate;

import com.dayou.enums.MainBusinessEnum;
import com.github.liangbaika.validate.annations.AbcValidate;
import com.github.liangbaika.validate.enums.Check;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 项目信息表
 * </p>
 *
 * @author wucl
 * @since 2022-12-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ExcelSheet(sheetName = "项目信息表")
@LuceneResource(value = MainBusinessEnum.ITEM_BUSINESS,serviceImplClassName = "itemServiceImpl",menuName = "项目列表",url = "/item/list")
public class Item extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称",width=40)
    @LuceneSearchable
    private String name;

    /**
     * 事业部流水号
     */
    @Excel(name = "事业部流水号")
    private String businessNo;

    /**
     * 公司OA流水号(项目编号)
     */
    @Excel(name = "项目编号")
    @LuceneSearchable("ao_no")
    private String oaNo;

    /**
     * 项目类型
     */
    @AbcValidate(required = true,message = "项目类型不能为空",fun = Check.NotNull)
    private Long cate;

    /**
     * 业务来源
     */
    @AbcValidate(required = true,message = "业务来源不能为空",fun = Check.NotNull)
    private Long businessSource;

    /**
     * 归属单位
     */
    @Excel(name = "归属单位",readConverterExp=("TJC=泰济诚,DY=大友"))
    private String belongTo;

    /**
     * 委托单位
     */
    @Excel(name = "委托单位")
    @LuceneSearchable("client_unit")
    private String clientUnit;

    /**
     * 客户名字
     */
    @Excel(name = "客户名字")
    @LuceneSearchable("client_name")
    private String clientName;

    /**
     * 联系方式
     */
    @Excel(name = "联系方式")
    private String mobile;

    /**
     * 客户经理
     */
    @Excel(name = "客户经理")
    private String clientManager;

    /**
     * 技术负责人
     */
    @Excel(name = "技术负责人")
    private String skiller;

    /**
     * 合同签订时间
     */
    @Excel(name = "签订时间")
    private LocalDate signDate;

    /**
     * 合同支付方式
     */
    @Excel(name = "支付方式")
    private String paymentMethod;

    /**
     * 合同金额
     */
    @Excel(name = "合同金额")
    @TableField(value = "amount", fill = FieldFill.UPDATE)
    private BigDecimal amount;

    /**
     * 项目业务状态
     */
    private String state;

    /**
     * 所属部门
     */
    private Long departmentId;

    /**
     * 合同url
     */
    private String contractUrl;

    /**
     * 所属员工id(客户经理)
     */
    private Long userId;

    /**
     * 客户id
     */
    private Long customerId;

    /**
     * 合同上传日期
     */
    @Excel(name = "合同上传日期")
    @TableField(value = "upload_date", fill = FieldFill.UPDATE)
    private LocalDate uploadDate;
}
