Ignore:
Timestamp:
12/26/23 18:50:43 (6 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
1413ee2
Parents:
950fa0d
Message:

Add entire code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/entity/Stakeholder.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    22
    33import com.fasterxml.jackson.annotation.JsonIgnore;
     4import com.fasterxml.jackson.annotation.JsonManagedReference;
    45import lombok.AllArgsConstructor;
    56import lombok.Getter;
     
    1213import javax.persistence.*;
    1314import java.time.LocalDateTime;
     15import java.util.List;
    1416
    1517@Entity
     
    3941    private String email;
    4042
     43    @Column(name = "phone_number")
     44    private String phoneNumber;
     45
    4146    @Column(name = "username")
    4247    private String username;
     
    4449    @Column(name = "password")
    4550    private String password;
     51
     52    @OneToMany(mappedBy = "customer")
     53    @JsonManagedReference(value = "customerAppointments")
     54    private List<Appointment> appointments;
    4655
    4756    @Column(name = "created")
     
    5463    @JsonIgnore
    5564    private LocalDateTime modified;
     65
     66    public String getFullName() {
     67        return firstName + " " + lastName;
     68    }
    5669}
Note: See TracChangeset for help on using the changeset viewer.