Last change
on this file was 00fa72f, checked in by DenicaKj <dkorvezir@…>, 21 months ago |
Reservation Implemented
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 | import lombok.Getter;
|
---|
4 | import lombok.Setter;
|
---|
5 | import lombok.ToString;
|
---|
6 | import org.springframework.security.core.GrantedAuthority;
|
---|
7 | import org.springframework.security.core.userdetails.UserDetails;
|
---|
8 |
|
---|
9 | import javax.management.relation.Role;
|
---|
10 | import javax.persistence.*;
|
---|
11 | import java.time.LocalDate;
|
---|
12 | import java.time.LocalDateTime;
|
---|
13 | import java.util.Collection;
|
---|
14 |
|
---|
15 |
|
---|
16 | import java.util.Objects;
|
---|
17 |
|
---|
18 | @Getter
|
---|
19 | @Setter
|
---|
20 | @ToString
|
---|
21 | @Entity
|
---|
22 | @Table(name = "categories")
|
---|
23 | public class Category {
|
---|
24 | @Id
|
---|
25 | @Column(name = "id_category", nullable = false)
|
---|
26 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
27 | Integer idcategory;
|
---|
28 | String name;
|
---|
29 | Integer extra_amount;
|
---|
30 |
|
---|
31 | public Category(String name, Integer extra_amount) {
|
---|
32 | this.name = name;
|
---|
33 | this.extra_amount = extra_amount;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public Category() {
|
---|
37 |
|
---|
38 | }
|
---|
39 |
|
---|
40 | @Override
|
---|
41 | public boolean equals(Object o) {
|
---|
42 | if (this == o) return true;
|
---|
43 | if (o == null || getClass() != o.getClass()) return false;
|
---|
44 | Category that = (Category) o;
|
---|
45 | return Objects.equals(idcategory, that.idcategory) && Objects.equals(name, that.name) && Objects.equals(extra_amount, that.extra_amount);
|
---|
46 | }
|
---|
47 |
|
---|
48 | @Override
|
---|
49 | public int hashCode() {
|
---|
50 | return Objects.hash(idcategory, name, extra_amount);
|
---|
51 | }
|
---|
52 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.