/*
 * Copyright (c) 2023 codvision.com All Rights Reserved.
 */

package com.codvision.workflow.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @author codvision
 */
@Data
@ApiModel
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("tbl_questionnaire")
public class Questionnaire implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("创建人")
    private Integer createBy;

    @ApiModelProperty("有效开始时间")
    private String startTime;

    @NotBlank(message = "问卷名称不能为空")
    @ApiModelProperty("问卷名称")
    private String name;

    @ApiModelProperty("有效截至时间")
    private String endTime;

    @ApiModelProperty("唯一id")
    private String uuid;

    @ApiModelProperty("问卷状态（0-未发布，1-已发布，2已过期）")
    private Integer status;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
