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 javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 提交作品表单模板表
 *
 * @TableName vote_submission_form
 */
@Data
public class VoteSubmissionForm implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

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

    /**
     * 表单配置
     */
    private String formData;

    /**
     * 租户
     */
    private Long tenantId;

    /**
     *
     */
    private Date createdAt;

    /**
     *
     */
    private Date updatedAt;

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

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

    private static final long serialVersionUID = 1L;
}
