package com.ywt.mg.domain.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "mg_right_rels")
public class MgRightRels {
    @Id
    private Integer id;

    @Column(name = "key_id")
    private Integer keyId;

    @Column(name = "role_id")
    private Integer roleId;

    /**
     * 当 type = 1 时，key_id 表示 mg_menus 表的ID，role_id 表示 mg_roles 表的ID
     */
    @Column(name = "type")
    private Integer type;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getKeyId() {
        return keyId;
    }

    public void setKeyId(Integer keyId) {
        this.keyId = keyId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
