package com.softwarebr.nunu.entity.res;

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.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 项目需求资源
 * @date 2020-02-21 11:47:29
 * @author lilin
 */

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="res_project")
@Builder
public class Project {

	/** 项目类型(1技术开发)*/
	public final static Integer TYPE_TECHNOLOGICAL_DEVELOPMENT = 1;

	/** 项目类型(2知识产权许可)*/
	public final static Integer TYPE_INTELLECTUAL_PROPERTY_LICENSING = 2;

	/** 项目类型(3成果转让)*/
	public final static Integer TYPE_ACHIEVEMENT_TRANSFER = 3;

	/** 项目类型(4技术咨询)*/
	public final static Integer TYPE_TECHNICAL_CONSULTATION = 4;

	/** 项目类型(5成果转移合作)*/
	public final static Integer TYPE_RESULTS_TRANSFER_COOPERATION = 5;

	@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 = "项目名称", required = true, example = "")
	private String projectName;

	@ApiModelProperty(value = "项目编号", required = true, example = "")
	private String projectNo;

	@ApiModelProperty(value = "发布者", required = true, example = "")
	private Long publisher;

	@ApiModelProperty(value = "项目状态(1征集中 2已对接 3已终止)", required = true, example = "")
	private Integer status;

	@ApiModelProperty(value = "项目类型(1技术开发 2知识产权许可 3成果转让 4技术咨询 5成果转移合作)", required = true, example = "")
	private Integer type;

	@ApiModelProperty(value = "项目价格(-1 面议 单位分)", required = true, example = "")
	private BigDecimal price;

	@ApiModelProperty(value = "项目封面图", required = true, example = "")
	@Column(length = Integer.MAX_VALUE)
	private String coverUri;

	@ApiModelProperty(value = "项目简介", required = true, example = "")
	@Column(length = Integer.MAX_VALUE)
	private String description;

	@ApiModelProperty(value = "交易流程(text)", required = true, example = "")
	@Column(length = Integer.MAX_VALUE)
	private String tradeProcess;

	@ApiModelProperty(value = "项目联系人", required = true, example = "")
	private String contact;

	@ApiModelProperty(value = "手机号码", required = true, example = "")
	private String contactPhone;

	@ApiModelProperty(value = "电子邮箱", required = true, example = "")
	private String email;

	@ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "")
	private Integer publicity;

	@ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", required = true, example = "")
	private Integer verify;

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

	@ApiModelProperty(value = "审核备注", required = true, example = "")
	private String verifyRemark;

	@ApiModelProperty(value = "删除标记0.已删除 1.未删除", required = true, example = "")
	private Integer marker;

	@ApiModelProperty(value = "是否上架(0下架 1上架) ", required = true, example = "")
	private Integer upperStatus;

	@ApiModelProperty(value = "是否推荐至首页(0否 1是)", required = true, example = "")
	private Integer indexType;

}