Advertisement
IronJoo

ProjectCall

Nov 27th, 2024
84
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.60 KB | None | 1 0
  1. package models.db.core.project;
  2.  
  3. import com.fasterxml.jackson.annotation.JsonProperty;
  4. import io.ebean.Model;
  5. import io.ebean.annotation.DbJsonB;
  6. import jakarta.persistence.*;
  7. import models.db.core.custom.CustomListElement;
  8. import utils.core.common.CurrencyAmount;
  9. import utils.core.common.enums.PrivacyLevelEnum;
  10. import utils.core.project.ProjectCallExtraData;
  11. import java.util.Date;
  12. import java.util.List;
  13.  
  14. /**
  15.  * This class represents a call for projects
  16.  *
  17.  * @author jfsfo
  18.  */
  19.  
  20. @Entity
  21. @Table(name = "core_project_project_call")
  22. public class ProjectCall extends Model {
  23.  
  24.     public static final int MAX_SIZE = 255;
  25.  
  26.     @Id
  27.     @GeneratedValue(strategy = GenerationType.SEQUENCE)
  28.     @Column(name = "id", nullable = false)
  29.     private Long id;
  30.  
  31.     // The year in which the project call was issued
  32.     @Column(name = "year")
  33.     private Integer year;
  34.  
  35.     // The funding type of the project call
  36.     @ManyToOne
  37.     private CustomListElement fundingType;
  38.  
  39.     // The origin of the funding entities (International, National, Mixed)
  40.     @ManyToOne
  41.     private CustomListElement fundingOrigin;
  42.  
  43.     // The designation of the project call (visible in the system) (in Portuguese)
  44.     @Column(name = "designation_pt", length = MAX_SIZE)
  45.     private String designationPt;
  46.  
  47.     // The designation of the project call (visible in the system) (in English)
  48.     @Column(name = "designation_en", length = MAX_SIZE)
  49.     private String designationEn;
  50.  
  51.     // The title of the project call assigned by the funding entity (in Portuguese)
  52.     @Column(name = "title_pt", length = MAX_SIZE)
  53.     private String titlePt;
  54.  
  55.     // The title of the project call assigned by the funding entity (in English)
  56.     @Column(name = "title_en", length = MAX_SIZE)
  57.     private String titleEn;
  58.  
  59.     // The detailed description of the project call (in Portuguese)
  60.     @Column(name = "description_pt", columnDefinition = "TEXT")
  61.     private String descriptionPt;
  62.  
  63.     // The detailed description of the project call (in English)
  64.     @Column(name = "description_en", columnDefinition = "TEXT")
  65.     private String descriptionEn;
  66.  
  67.     // The scientific areas covered by the project call
  68.     @ManyToMany
  69.     private List<CustomListElement> scientificAreas;
  70.  
  71.     // The total budget allocated for the project call
  72.     @JsonProperty(value = "total_budget")
  73.     private CurrencyAmount totalBudget;
  74.  
  75.     // The privacy level of the total budget
  76.     @Column(name = "total_budget_privacy_level")
  77.     private PrivacyLevelEnum totalBudgetPrivacyLevel;
  78.  
  79.     // The maximum number of funded proposals
  80.     @Column(name = "number_of_funded_proposals")
  81.     private Integer numberOfFundedProposals;
  82.  
  83.     // The maximum funding amount per project
  84.     @JsonProperty(value = "funding_amount_per_project")
  85.     private CurrencyAmount fundingAmountPerProject;
  86.  
  87.     // The privacy level of the funding amount
  88.     @Column(name = "funding_amount_per_project_privacy_level")
  89.     private PrivacyLevelEnum fundingAmountPerProjectPrivacyLevel;
  90.  
  91.     // The expected duration of the projects (in months)
  92.     @Column(name = "duration_in_months")
  93.     private Integer durationInMonths;
  94.  
  95.     // The start date of the project call
  96.     @Column(name = "call_start_date")
  97.     private Date callStartDate;
  98.  
  99.     // The end date of the project call
  100.     @Column(name = "call_end_date")
  101.     private Date callEndDate;
  102.  
  103.     // Whether the project call is currently public in the system
  104.     @Column(name = "privacy_level")
  105.     private PrivacyLevelEnum privacyLevel;
  106.  
  107.     @DbJsonB
  108.     @Column(name = "extra_data")
  109.     private ProjectCallExtraData extraData;
  110.  
  111. }
  112.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement