source:
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java@
fdd7961
Last change on this file since fdd7961 was fdd7961, checked in by , 16 months ago | |
---|---|
|
|
File size: 503 bytes |
Rev | Line | |
---|---|---|
[3d3e59d] | 1 | package finki.paw5.model.entities; |
[d427a07] | 2 | |
[038c9f7] | 3 | import jakarta.persistence.*; |
[d427a07] | 4 | import lombok.Data; |
[fdd7961] | 5 | import lombok.RequiredArgsConstructor; |
[d427a07] | 6 | |
7 | @Data | |
8 | @Entity | |
[fdd7961] | 9 | @RequiredArgsConstructor |
[d427a07] | 10 | @Table(name = "category") |
11 | public class Category { | |
12 | ||
13 | @Id | |
[038c9f7] | 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
[d427a07] | 15 | @Column(name = "id_category") |
[ada7108] | 16 | private Integer id; |
[d427a07] | 17 | |
18 | @Column(name = "name_category", nullable = false, length = 100) | |
19 | private String name; | |
20 | ||
21 | public Category(String name) { | |
22 | this.name = name; | |
23 | } | |
24 | ||
25 | } |
Note:
See TracBrowser
for help on using the repository browser.