package com.softwarebr.nunu.entity.user;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 个人消息
 * @date 2020/03/17 15:40:01
 * @author lilin
 */

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="u_message")
@Builder
public class Message {

	/** 1 审核提醒 */
	public final static Integer MESSAGE_TYPE_VERIFY = 1;

	/** 2 项目联系方式审核提醒 */
	public final static Integer MESSAGE_TYPE_CONTACT_VERIFY = 2;

	/** 3 项目提交方收到申请提醒 */
	public final static Integer MESSAGE_TYPE_APPLY = 3;


	/** 审核提醒-1.政策申报 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_POLICY = 1;
	/** 审核提醒-2.创新资源-项目资源 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_PROJECT = 2;
	/** 审核提醒-3.创新资源-招聘资源 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_INVITE = 3;
	/** 审核提醒-4.创新资源-载体资源 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_PROPERTY = 4;
	/** 审核提醒-5.创新资源服务平台 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_PLATFORM = 5;
	/** 审核提醒-6.项目入驻 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_INVEST = 6;
	/** 审核提醒-7.创新培训学院 */
	public final static Integer MESSAGE_TARGET_TYPE_ONE_ACTIVITY = 7;
	/** 项目联系方式审核提醒|项目提交方收到申请提醒-1.创新项目路演厅 */
	public final static Integer MESSAGE_TARGET_TYPE_TWO_INVEST = 1;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@ApiModelProperty(value = "id", required = true, example = "1")
	private Long id;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间", required = true, example = "2018-03-12 21:32:33")
	private LocalDateTime createDate;

	@ApiModelProperty(value = "消息类型 1.审核提醒 2.项目联系方式审核提醒 3.项目提交方收到申请提醒", required = true, example = "")
	private Integer type;

	@ApiModelProperty(value = "用户", required = true, example = "")
	private Long memberId;

	@Column(length = Integer.MAX_VALUE)
	@ApiModelProperty(value = "消息内容(json)", required = true, example = "")
	private String content;

}