source: src/main/java/com/example/villadihovo/model/payments/Payment.java

Last change on this file was f7c05a1, checked in by Elena Shulevska <elena.shulevska@…>, 15 months ago

initial commit of the source code on origin

  • Property mode set to 100644
File size: 839 bytes
RevLine 
[f7c05a1]1package com.example.villadihovo.model.payments;
2
3import com.example.villadihovo.model.users.UserTable;
4import jakarta.persistence.*;
5import lombok.AllArgsConstructor;
6import lombok.Data;
7import lombok.NoArgsConstructor;
8
9import java.time.LocalDate;
10
11@AllArgsConstructor
12@NoArgsConstructor
13@Entity
14@Data
15@Inheritance(strategy = InheritanceType.JOINED)
16@Table(name="payment")
17public class Payment {
18
19 @Id
20 @GeneratedValue(strategy = GenerationType.IDENTITY)
21 private int payment_id;
22
23 @Column(nullable = false)
24 private float total_payment;
25
26 @Column(nullable = false)
27 private LocalDate pay_date;
28
29 @Column(nullable = false)
30 private String rec_id;
31
32 @Column(nullable = false)
33 private String customer_id;
34
35 @ManyToOne
36 @JoinColumn(name = "user_id", nullable = false)
37 private UserTable user_id;
38}
Note: See TracBrowser for help on using the repository browser.