package com.newfiber.modules.sys.entity; import com.alibaba.fastjson.annotation.JSONField; 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.newfiber.modules.inspection.entity.Buttons; import java.io.Serializable; import java.util.Date; import java.util.List; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; /** * 菜单新实体类 * @Author:zhz * @CreateDate:2020/11/19 14:52 * @Description: */ @Data @NoArgsConstructor @TableName("sys_menus") public class Menu implements Serializable{ @TableId(value = "serial",type = IdType.AUTO) private Integer serial; @TableField(value = "menu_no") private String menuNo; @TableField(value = "menu_name") private String menuName; @TableField(value = "menu_value") private String menuValue; @TableField(value = "menu_grade") private Integer menuGrade; @TableField(value = "menu_grade_zn") private String menuGradeZn; @TableField(value = "parent_menu_id") private String parentMenuId; @TableField(value = "menu_state") private Integer menuState; @TableField(value = "menu_state_zn") private String menuStateZn; @TableField(value = "menu_type") private Integer menuType; @TableField(value = "menu_type_zn") private String menuTypeZn; @TableField(value = "order_sort") private Integer orderSort; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(value = "create_time") private Date createTime; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(value = "update_time") private Date updateTime; @TableField(value = "remark") private String remark; @TableField(value = "menu_icons") private String menuIcons; @TableField(value = "icons_name") private String iconsName; /** 每个菜单下的所有按钮 */ @TableField(exist = false) private List<Buttons> buttons; @TableField(exist = false) private List<Menu> childern; /** 权限编号 */ @TableField(exist = false) private String jurNo; @Override public boolean equals(Object o) { Menu menu = (Menu) o; return menuNo != null ? menuNo.equals(menu.menuNo) : menu.menuNo == null; } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (menuNo != null ? menuNo.hashCode() : 0); return result; } }