package com.ozs.plan.doman;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ozs.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("plan_practical")
public class ProvisionalPlan {

    @ApiModelProperty(value = "主键ID")
    @TableField("plan_practical_id")
    private Integer planPracticalId;

    @ApiModelProperty(value = "年度计划ID")
    @TableField("plan_year_id")
    private Integer planYearId;

    @NotNull(message = "采购单位不能为空")
    @ApiModelProperty(value = "采购单位（登录账号的单位）")
    @TableField("purchase_dept_id")
    private String purchaseDeptId;

    @Excel(name = "采购单位")
    @TableField(exist = false)
    private String purchaseDeptName;

    @Excel(name = "项目名称")
    @NotNull(message = "项目名称不能为空")
    @ApiModelProperty(value = "项目名称")
    @TableField("project_name")
    private String projectName;

    @Excel(name = "项目类型")
    @ApiModelProperty(value = "项目类型（0：装备类；1：物资类；2：服务类；3：工程类）")
    @TableField("project_type")
    private String projectType;
    @TableField(exist = false)
    private String projectTypeStr;

    @Excel(name = "需求概况")
    @ApiModelProperty(value = "需求概况")
    @TableField("demand_overview")
    private String demandOverview;

    @Excel(name = "概算金额（万元）")
    @ApiModelProperty(value = "概算金额(万元（保留小数点后两位）")
    @TableField("evaluation")
    private BigDecimal evaluation;

    @ApiModelProperty(value = "是否为超限额计划(0:未超额，1:超额)")
    @TableField("is_excess")
    private String isExcess;

    @ApiModelProperty(value = "采购服务站")
    @TableField("purchase_services")
    private String  purchaseServices;
    @Excel(name = "采购服务站")
    @TableField(exist = false)
    private String purchaseServicesStr;

    @Excel(name = "采购方式")
    @ApiModelProperty(value = "采购方式  (0:公开招标, 1:单一来源,2:邀请招标,3:竞争式谈判,4:询价)")
    @TableField("purchase_mode")
    private String purchaseMode;
    @TableField(exist = false)
    private String purchaseModeStr;

    @Excel(name = "提报需求时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划提报需求时间--->需求单位成功提报采购需求的日期（具体到月）")
    @TableField("plan_demand_sub_time")
    private Date planDemandSubTime;

    @Excel(name = "完成采购时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划完成采购时间--->公示中标结果的日期，即填制中标信息的日期（具体到月）")
    @TableField("plan_purchase_finish_time")
    private Date planPurchaseFinishTime;

    @Excel(name = "交付（实施）时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划交付时间--->供应商完成并交付后，使用单位收到标的日期，即填制建设文档的日期")
    @TableField("plan_deliver_time")
    private Date planDeliverTime;

    @ApiModelProperty(value = "项目属性（0:应急应战项目， 1:重大规划任务项目， 2:规划任务项目， 3:一般项目）")
    @TableField("project_attr")
    private String projectAttr;
    @Excel(name = "项目属性")
    @TableField(exist = false)
    private String projectAttrStr;

    @Excel(name = "计划调整情况及理由")
    @ApiModelProperty(value = "计划调整情况及理由--->如计划需要变更，在填写申请修改时需填写调整情况及理由，审核单位审核通过后显示该信息")
    @TableField("adjust_reason")
    private String adjustReason;

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "项目状态(0:计划待提交，1:计划待审核，2:计划已退回，3:计划已审核)")
    @TableField("project_status")
    private String projectStatus;

    @ApiModelProperty(value = "退回原因")
    @TableField("refuse_reason")
    private String refuseReason;

    @ApiModelProperty(value = "0：正常，1：已删除")
    @TableField("del_flay")
    private String delFlay;

    @ApiModelProperty(value = "计划类型（0：季度计划，1：临时计划）")
    @TableField("plan_type")
    private String planType;

    @ApiModelProperty(value = "创建者")
    @TableField("created")
    private String created;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "修改者")
    @TableField("updated")
    private String updated;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Date updateTime;
}
