source: src/main/java/com/tourMate/entities/Role.java@ e9b4ba9

Last change on this file since e9b4ba9 was e9b4ba9, checked in by darsov2 <62809499+darsov2@…>, 12 months ago

prototype

  • Property mode set to 100644
File size: 808 bytes
RevLine 
[e9b4ba9]1package com.tourMate.entities;
2
3import jakarta.persistence.*;
4import org.jetbrains.annotations.NotNull;
5
6@Entity
7@Table(name = "roles")
8public class Role {
9
10 private long roleId;
11 private String roleName;
12
13 public Role(String roleName) {
14 this.roleName = roleName;
15 }
16
17 public Role() {
18 }
19
20 @Id
21 @GeneratedValue(strategy = GenerationType.IDENTITY)
22 @Column(name = "role_id", unique = true, nullable = false)
23 @NotNull
24 public long getRoleId() {
25 return roleId;
26 }
27
28 public void setRoleId(long roleId) {
29 this.roleId = roleId;
30 }
31
32 @Column(name = "name", unique = true, nullable = false)
33 public String getRoleName() {
34 return roleName;
35 }
36
37 public void setRoleName(String roleName) {
38 this.roleName = roleName;
39 }
40}
Note: See TracBrowser for help on using the repository browser.