package top.tqx.demo_1.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName(value = "exam_assignment", autoResultMap = true)
public class ExamAssignment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "paper_id")
    private String paperId;

    @TableField(value = "dept_id")
    private Long deptId;

    @TableField(value = "dept_ids", typeHandler = JacksonTypeHandler.class)
    private JsonNode deptIds;

    @TableField(value = "user_ids", typeHandler = JacksonTypeHandler.class)
    private JsonNode userIds;

    @TableField(value = "exclude_user_ids", typeHandler = JacksonTypeHandler.class)
    private JsonNode excludeUserIds;

    @TableField(value = "status")
    private String status;

    @TableField(value = "created_at")
    private LocalDateTime createdAt;

    @TableField(value = "updated_at")
    private LocalDateTime updatedAt;

    @TableField(value = "publish_time")
    private LocalDateTime publishTime;

    @TableField(value = "deadline")
    private LocalDateTime deadline;
}