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.baomidou.mybatisplus.annotation.TableName;
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_rule
 */
@Data
@TableName("vote_rule")
public class VoteRule implements Serializable {
    /**
     * 主键
     */
    @TableId (value = "rule_Id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ruleId;

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

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

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

    /**
     * 总分
     */
    private Double aggregate;

    /**
     * 总数
     */
    private Integer total;

    /**
     * 创建时间
     */
    private Date creatTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private String keyword;

    private static final long serialVersionUID = 1L;
}
