package com.softwarebr.nunu.entity.train;

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/11 15:30:46
 * @author lilin
 */
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name="train_activity_log")
@Builder
public class ActivityLog {

	/**
	 * 失效
	 */
	public final static Integer FAILURE_STATUS_NO= 0;
	/**
	 * 有效
	 */
	public final static Integer FAILURE_STATUS_YES = 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 = "活动id", required = true, example = "")
	private Long activityId;

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

	@ApiModelProperty(value = "姓名", required = true, example = "")
	private String name;

	@ApiModelProperty(value = "联系方式", required = true, example = "")
	private String contact;

	@ApiModelProperty(value = "公司名称", required = true, example = "")
	private String companyName;

	@ApiModelProperty(value = "职位", required = true, example = "")
	private String position;

	@ApiModelProperty(value = "报名人数", required = true, example = "")
	private Integer enrolment;

	@ApiModelProperty(value = "入场码", required = true, example = "")
	private String voucherCode;

	@ApiModelProperty(value = "订单号", required = true, example = "")
	private String orderNo;

	@ApiModelProperty(value = "入场码失效状态0.失效 1.有效", required = true, example = "")
	private Integer failureStatus;

}