package com.vote.system.domain;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 报名表单表
 *
 * @TableName vote_registration_forms
 */
@Data
public class VoteRegistrationForms implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 表单名称
     */
    @NotNull(message = "表单名称不允许为空")
    @Valid
    @Size(max = 255, message = "表单名称最大不可超过255")
    private String formName;

    /**
     * 表单配置，存储多个模板ID，使用逗号分隔
     */
    private String formData;

    /**
     *
     */
    private Date createdAt;

    /**
     *
     */
    private Date updatedAt;


    @TableField(select = false)
    private String keyword; //搜索值

    @TableField(select = false)
    private Integer count;//内容项数量

    private static final long serialVersionUID = 1L;
}
