package com.sysu.admin.support.system.role_permission;

import com.xiesx.fastboot.core.jpa.entity.JpaPlusEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @title RolePermission
 * @description
 * @author XIE
 * @date 2020年4月24日下午10:07:17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@FieldNameConstants(innerTypeName = "FIELDS")
@Table(name = "sys_role_permission")
@Entity
@DynamicInsert
@DynamicUpdate
public class RolePermission extends JpaPlusEntity<RolePermission> {

    private static final long serialVersionUID = 1L;

    /**
     * 联合主键
     */
    @EmbeddedId
    private PKRP pk;

    /**
     * 权限
     */
    @Column
    private String permission;
}
