package com.xydl.cac.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "admin")
@ApiModel("admin表")
public class Admin {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @NotBlank(message = "管理员名称不能为空")
    @ApiModelProperty("管理员名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty("管理员密码")
    @Column(name = "password")
    private String password;

    @ApiModelProperty("菜单配置 1:显示 0:隐藏")
    @Column(name = "menus")
    private String menus;

}