package controll.security;

import javax.persistence.*;


@SuppressWarnings("serial")
@Entity
@Table(name = "permission")
public class Permission implements java.io.Serializable {

	@Id
	@GeneratedValue
	private Long id;

	@Column(unique = true)
	private String name;

	@Column
	private String permission;

	protected Permission() {
	}

	public Permission(String name, String permission) {
		this.name = name;
		this.permission = permission;
	}

	public String toString(){
		return getName() + " [" + getPermission() + "] " + "(" + getId() + ")";
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}
}
