Ignore:
Timestamp:
02/23/25 20:37:56 (3 months ago)
Author:
ste08 <sjovanoska@…>
Branches:
master
Children:
fda671c
Parents:
de83113
git-author:
ste08 <sjovanoska@…> (02/23/25 20:37:23)
git-committer:
ste08 <sjovanoska@…> (02/23/25 20:37:56)
Message:

Report working, Wishlist partly working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/skychasemk/model/TopMonthlyReport.java

    rde83113 r62bba0c  
    11package com.example.skychasemk.model;
    22
    3 import jakarta.persistence.Column;
    4 import jakarta.persistence.Entity;
    5 import jakarta.persistence.Id;
    6 import jakarta.persistence.Table;
     3import jakarta.persistence.*;
     4import lombok.Getter;
     5import lombok.Setter;
     6import org.hibernate.annotations.Immutable;
    77
    88import java.time.LocalDate;
    9 
     9@Setter
     10@Getter
    1011@Entity
    1112@Table(name="topmonhtlyreport")
     13@IdClass(TopMonthlyReportId.class) // Define composite key
     14
    1215public class TopMonthlyReport {
     16    // Getters and Setters
    1317    @Id
    1418    @Column(name = "month")
    1519    private LocalDate month;
    16 
     20    @Id
    1721    @Column(name = "category")
    1822    private String category;
    19 
     23    @Id
    2024    @Column(name = "name")
    2125    private String name;
    22 
    2326    @Column(name = "count")
    2427    private int count;
    2528
    26     // Getters and Setters
    27     public LocalDate getMonth() {
    28         return month;
    29     }
    30 
    31     public void setMonth(LocalDate month) {
    32         this.month = month;
    33     }
    34 
    35     public String getCategory() {
    36         return category;
    37     }
    38 
    39     public void setCategory(String category) {
    40         this.category = category;
    41     }
    42 
    43     public String getName() {
    44         return name;
    45     }
    46 
    47     public void setName(String name) {
    48         this.name = name;
    49     }
    50 
    51     public int getCount() {
    52         return count;
    53     }
    54 
    55     public void setCount(int count) {
    56         this.count = count;
    57     }
    5829}
Note: See TracChangeset for help on using the changeset viewer.