66 lines
1.6 KiB
Java
66 lines
1.6 KiB
Java
package com.billpaymentservice.bbps.entites;
|
|
|
|
import java.util.List;
|
|
|
|
import jakarta.persistence.CascadeType;
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.FetchType;
|
|
import jakarta.persistence.GeneratedValue;
|
|
import jakarta.persistence.GenerationType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.JoinColumn;
|
|
import jakarta.persistence.ManyToOne;
|
|
import jakarta.persistence.OneToMany;
|
|
import jakarta.persistence.OneToOne;
|
|
import jakarta.persistence.Table;
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
@Entity
|
|
@Table(name = "bbps_plan")
|
|
@Getter
|
|
@Setter
|
|
public class Plan {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(name = "plan_id")
|
|
private String planId;
|
|
|
|
@Column(name = "description", columnDefinition = "TEXT")
|
|
private String description;
|
|
|
|
@Column(name = "biller_id")
|
|
private String billerId;
|
|
|
|
@Column(name = "category_type")
|
|
private String categoryType;
|
|
|
|
@Column(name = "amount_rupees")
|
|
private String amountInRupees;
|
|
|
|
@Column(name = "effectv_form")
|
|
private String effctvFrom;
|
|
|
|
@Column(name = "effectv_to")
|
|
private String effctvTo;
|
|
|
|
@Column(name = "status")
|
|
private String status;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "plans_list_id")
|
|
private PlansList plansList;
|
|
|
|
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "plan")
|
|
private List<PlanCategorySubType> categorySubTypes; // List of categorySubTypes
|
|
|
|
@OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
|
@JoinColumn(name = "additional_info_id", referencedColumnName = "id")
|
|
private AdditionalInfoPlans additionalInfo;
|
|
|
|
}
|