package com.heketai.website.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 角色菜单关联表
 * </p>
 *
 * @author xjl
 * @since 2019-11-13
 */
@TableName("sys_role_menu")
@Data
@EqualsAndHashCode(callSuper=true)
public class SysRoleMenu extends Model<SysRoleMenu> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("主键")
    private Integer id;

    @TableField("role_id")
    @ApiModelProperty("角色id")
    private Integer roleId;

    @TableField("menu_id")
    @ApiModelProperty("菜单id")
    private Integer menuId;

    @TableField("create_time")
    @ApiModelProperty("创建时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("modify_time")
    @ApiModelProperty("更新时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
