/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.work.entity.report;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.iim.entity.LayGroup;
import com.jeeplus.modules.sys.entity.User;

import java.util.Date;

/**
 * 工作报告Entity
 * @author 许凯
 * @version 2017-04-21
 */
public class WorkReportRecord extends DataEntity<WorkReportRecord> {
	
	private static final long serialVersionUID = 1L;
	private WorkReport report;		// 工作报告主键ID 父类
	private User user;		// 接收人
	private LayGroup group;	// 接收群//已弃用
	private String readFlag;		// 阅读标记
	private Date readDate;		// 阅读时间
	
	public WorkReportRecord() {
		super();
	}

	public WorkReportRecord(String id){
		super(id);
	}

	public WorkReportRecord(WorkReport report){
		this.report = report;
	}

	public WorkReport getReport() {
		return report;
	}

	public void setReport(WorkReport report) {
		this.report = report;
	}
	
	@ExcelField(title="接收人", fieldType=User.class, value="user.name", align=2, sort=2)
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@ExcelField(title="接收群", fieldType=LayGroup.class, value="group.groupname", align=2, sort=3)

	public LayGroup getGroup() {
	//	System.out.println("=====group======"+group);
		return group;
	}

	public void setGroup(LayGroup group) {
		this.group = group;
	}
	
	@ExcelField(title="阅读标记", align=2, sort=4)
	public String getReadFlag() {
		return readFlag;
	}


	public void setReadFlag(String readFlag) {
		this.readFlag = readFlag;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="阅读时间", align=2, sort=5)
	public Date getReadDate() {
		return readDate;
	}

	public void setReadDate(Date readDate) {
		this.readDate = readDate;
	}
	
}