Rev | Line | |
---|
[caf3a07] | 1 | package com.example.moviezone.model;
|
---|
| 2 |
|
---|
| 3 | import lombok.Getter;
|
---|
| 4 | import lombok.Setter;
|
---|
| 5 | import lombok.ToString;
|
---|
[2269653] | 6 | import org.springframework.security.core.GrantedAuthority;
|
---|
| 7 | import org.springframework.security.core.userdetails.UserDetails;
|
---|
[caf3a07] | 8 |
|
---|
[2269653] | 9 | import javax.management.relation.Role;
|
---|
| 10 | import javax.persistence.*;
|
---|
[caf3a07] | 11 | import java.time.LocalDate;
|
---|
[2269653] | 12 | import java.time.LocalDateTime;
|
---|
| 13 | import java.util.Collection;
|
---|
| 14 |
|
---|
[caf3a07] | 15 |
|
---|
| 16 | @Entity
|
---|
| 17 | @Getter
|
---|
| 18 | @Setter
|
---|
| 19 | @ToString
|
---|
| 20 | @Table(name = "discounts")
|
---|
| 21 | public class Discount {
|
---|
| 22 | @Id
|
---|
| 23 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 24 | Integer id_discount;
|
---|
| 25 |
|
---|
| 26 | LocalDate validity;
|
---|
| 27 |
|
---|
| 28 | String code;
|
---|
| 29 | String type;
|
---|
| 30 | Integer percent;
|
---|
[1e7126f] | 31 |
|
---|
| 32 | public Discount() {
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | public Discount(LocalDate validity, String code, String type, Integer percent) {
|
---|
| 36 | this.validity = validity;
|
---|
| 37 | this.code = code;
|
---|
| 38 | this.type = type;
|
---|
| 39 | this.percent = percent;
|
---|
| 40 | }
|
---|
[caf3a07] | 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.