|
Last change
on this file was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 7 days ago |
|
Initial project upload
|
-
Property mode
set to
100644
|
|
File size:
712 bytes
|
| Line | |
|---|
| 1 | package mk.ukim.finki.wp.db.entity;
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | import jakarta.persistence.*;
|
|---|
| 5 | import lombok.*;
|
|---|
| 6 | import mk.ukim.finki.wp.db.entity.user.User;
|
|---|
| 7 |
|
|---|
| 8 | import java.math.BigDecimal;
|
|---|
| 9 |
|
|---|
| 10 | @Entity
|
|---|
| 11 | @Table(name = "payment")
|
|---|
| 12 | @Getter
|
|---|
| 13 | @Setter
|
|---|
| 14 | @NoArgsConstructor
|
|---|
| 15 | @AllArgsConstructor
|
|---|
| 16 | @Builder
|
|---|
| 17 | public class Payment {
|
|---|
| 18 |
|
|---|
| 19 | @Id
|
|---|
| 20 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|---|
| 21 | @Column(name = "payment_id")
|
|---|
| 22 | private Integer paymentId;
|
|---|
| 23 |
|
|---|
| 24 | @ManyToOne(optional = false)
|
|---|
| 25 | @JoinColumn(name = "user_id")
|
|---|
| 26 | private User user;
|
|---|
| 27 |
|
|---|
| 28 | @ManyToOne(optional = false)
|
|---|
| 29 | @JoinColumn(name = "subscription_id")
|
|---|
| 30 | private UserSubscription subscription;
|
|---|
| 31 |
|
|---|
| 32 | @Column(nullable = false, precision = 10, scale = 2)
|
|---|
| 33 | private BigDecimal amount;
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.