package com.izouma.wenlvju.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.time.LocalDate;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Where(clause = "del = 0")
@ApiModel(value = "监管管理")
public class Regulatory extends BaseEntity {
    private Long recordId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "recordId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
    @NotFound(action = NotFoundAction.IGNORE)
    private Record record;


    @ApiModelProperty(value = "监管人员")
    private Long supervisorUserId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "supervisorUserId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
    @NotFound(action = NotFoundAction.IGNORE)
    private User supervisorUser;


    private LocalDate time;

    @ApiModelProperty(value = "是否考前备案")
    private Boolean isRecord;
    @ApiModelProperty(value = "是否明显位置张贴《考试简章》")
    private Boolean isPostExamGuide;
    @ApiModelProperty(value = "考场服务设备是否完善")
    private Boolean isPerfectDeviceServices;
    @ApiModelProperty(value = "考试时间与备案考试时间是否一致")
    private Boolean isHaveTheSameTime;
    @ApiModelProperty(value = "考试地点与备案考试地点是否一致")
    private Boolean isSameAddress;
    @ApiModelProperty(value = "是否有无相关专业考官且佩戴考官证")
    private Boolean isExaminer;
    @ApiModelProperty(value = "是否现场对艺术水平做出评定")
    private Boolean isRate;
    @ApiModelProperty(value = "是否是所属考级机构教材确定的考级内容")
    private Boolean isSureContent;
    @ApiModelProperty(value = "是否在明显位置张贴《疫情防控指南》海报")
    private Boolean isPostPoster;
    @ApiModelProperty(value = "考点是否配备测量体温设备，且专人值守")
    private Boolean isHaveThermometer;
    @ApiModelProperty(value = "考场是否实施预约限流措施")
    private Boolean isSchedule;

    @ApiModelProperty(value = "其他")
    private String other;
}
