package com.qunzhixinxi.hnqz.admin.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 档案-项目管理
 *
 * @author Liujh
 * @date 2020-12-8
 */
@Data
@TableName("wm_da_project")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "档案-项目管理")
public class WmDaProject extends Model<WmDaProject> {

	@TableId
	@ApiModelProperty(value="id")
	private Integer Id;

	@ApiModelProperty(value="项目ID")
	private Long projectId;

	@ApiModelProperty(value="项目名称")
	private String projectName;

	@ApiModelProperty(value="项目甲方")
	private String partya;

	@ApiModelProperty(value="项目乙方")
	private String partyb;

	@ApiModelProperty(value="签订日期")
	@JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date signData;

	@ApiModelProperty(value="有效期截止")
	@JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date expirationDate;

	@ApiModelProperty(value="项目状态")
	private Integer projectStatus;

	@ApiModelProperty(value="客户维护")
	private String customerCare;

	@ApiModelProperty(value="说明")
	private String remark;

	@ApiModelProperty(value="合同附件")
	private String contractFile;

	@ApiModelProperty(value="合同名称")
	private String contractName;

	@ApiModelProperty(value="创建时间")
	@JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date createTime;

	@ApiModelProperty(value="创建人")
	private Integer createUser;

	@ApiModelProperty(value="更新时间")
	@JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date updateTime;

	@ApiModelProperty(value="更新人")
	private Integer updateUser;

	@ApiModelProperty(value="备用1")
	private String export1;

	@ApiModelProperty(value="备用2")
	private String export2;

	@ApiModelProperty(value="备用3")
	private String export3;

	private List<WmDaTrack> wmDaTrackList;

//	public WmDaProject generatewmDaProject(Map<String,Object> map){
//		String Id= StringUtil.toString(map.get("id"));
//		if(null==Id||"".equals(Id)){
//			this.setId((int) IDUtils.getRentId());
//		}else{
//			this.setId(Integer.valueOf(Id));
//		}
//		this.setProjectId(map.get("projectId")==null?null:Integer.valueOf(StringUtil.toString(map.get("projectId"))));
//		this.setProjectName(StringUtil.toString(map.get("projectName")));
//		this.setPartya(map.get("partya") == null ? null : StringUtil.toString(map.get("partya")));
//		this.setPartyb(map.get("partyb") == null ? null : StringUtil.toString(map.get("partyb")));
//		this.setStatus(map.get("status")==null?null:Integer.valueOf(StringUtil.toString(map.get("status"))));
//		this.setCustomerCare(map.get("customerCare") == null ? null : StringUtil.toString(map.get("customerCare")));
//		this.setRemark(map.get("remark") == null ? null : StringUtil.toString(map.get("remark")));
//		this.setContractFile(map.get("contractFile") == null ? null : StringUtil.toString(map.get("contractFile")));
//		this.setContractName(map.get("contractName") == null ? null : StringUtil.toString(map.get("contractName")));
//		this.setCreateUser(map.get("createUser")==null?null:Integer.valueOf(StringUtil.toString(map.get("createUser"))));
//		this.setUpdateUser(map.get("updateUser")==null?null:Integer.valueOf(StringUtil.toString(map.get("updateUser"))));
//		this.setSignData(map.get("signData") == null ? new Date() :
//				DateUtil.stringToDate(StringUtil.toString(map.get("signData")), DateUtil.DATE_Y_M_DH_NORMAL));
//		this.setExpirationDate(map.get("expirationDate") == null ? new Date() :
//				DateUtil.stringToDate(StringUtil.toString(map.get("expirationDate")), DateUtil.DATE_Y_M_DH_NORMAL));
//		this.setCreateTime(map.get("createTime") == null ? new Date() :
//				DateUtil.stringToDate(StringUtil.toString(map.get("createTime")), DateUtil.DATE_Y_M_DH_NORMAL));
//		this.setUpdateTime(map.get("updateTime") == null ? new Date() :
//				DateUtil.stringToDate(StringUtil.toString(map.get("updateTime")), DateUtil.DATE_Y_M_DH_NORMAL));
//
//		return this;
//	}

}
