source: src/main/java/mk/ukim/finki/wp/db/entity/UserSubscription.java

Last change on this file was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 8 days ago

Initial project upload

  • Property mode set to 100644
File size: 870 bytes
Line 
1package mk.ukim.finki.wp.db.entity;
2
3import jakarta.persistence.*;
4import lombok.*;
5import mk.ukim.finki.wp.db.entity.user.User;
6
7import java.time.LocalDate;
8
9@Entity
10@Table(name = "user_subscription")
11@Getter
12@Setter
13@NoArgsConstructor
14@AllArgsConstructor
15@Builder
16public class UserSubscription {
17
18 @Id
19 @GeneratedValue(strategy = GenerationType.IDENTITY)
20 @Column(name = "subscription_id")
21 private Integer subscriptionId;
22
23 @ManyToOne(optional = false)
24 @JoinColumn(name = "user_id")
25 private User user;
26
27 @ManyToOne(optional = false)
28 @JoinColumn(name = "plan_id")
29 private SubscriptionPlan plan;
30
31 @Column(name = "start_date", nullable = false)
32 private LocalDate startDate;
33
34 @Column(name = "end_date", nullable = false)
35 private LocalDate endDate;
36
37 @Column(nullable = false, length = 30)
38 private String status;
39}
Note: See TracBrowser for help on using the repository browser.