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 com.vctgo.common.core.web.domain.BaseEntity;
import lombok.Data;

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

/**
 * 报名表表单模板
 *
 * @TableName vote_form_templates
 */
@Data
public class VoteFormTemplates 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 templateName;

    /**
     * 字段名
     */
    private String fieldName;


    /**
     * 排序
     */
    private Integer sortOrder;

    /**
     * 模板配置项
     */
    private String templateJson;

    /**
     * 视图
     */
    private String images;

    /**
     * 描述
     */
    private String description;

    /**
     * (0显示 1删除)
     */
    private String isDeleted;

    /**
     * 状态(0正常1禁用)
     */
    private Integer status;

    /**
     *
     */
    private Date createdAt;

    /**
     *
     */
    private Date updatedAt;

    @TableField(exist = false)
    private String keyword;

    private static final long serialVersionUID = 1L;
}
