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.time.LocalDateTime;

/**
 * 资源申请
 * @date 2020-02-24 12:19:06
 * @author lilin
 */

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="res_property_apply")
@Builder
public class PropertyApply {

	/**
	 * 资源类型(1.项目资源)
	 */
	public final static int RESOURCE_TYPE_PROJECT = 1;

	/**
	 * 资源类型(2.招聘资源)
	 */
	public final static int RESOURCE_TYPE_INVITE = 2;

	/**
	 * 资源类型(3.载体资源)
	 */
	public final static int RESOURCE_TYPE_PROPERTY = 3;

	@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 reason;

	@ApiModelProperty(value = "资源类型(1.项目资源 2.招聘资源 3.载体资源 )", required = true, example = "")
	private Integer resourceType;

	@ApiModelProperty(value = "对象id", required = true, example = "")
	private Long targetId;

	@ApiModelProperty(value = "申请人", required = true, example = "")
	private Long proposer;

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

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

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

}