Ignore:
Timestamp:
02/16/23 15:22:04 (17 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
6941fac
Parents:
04e4f54 (diff), eef07ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'main' into create-post

Location:
Prototype Application/Paw5/src/main/java/finki/paw5
Files:
6 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adopter.java

    r04e4f54 r9ee306b  
    2323
    2424    @Column(name = "has_other_pets")
    25     private boolean hasOtherPets;
     25    private Boolean hasOtherPets;
    2626
    2727    @Column(name = "has_kids")
    28     private boolean hasKids;
     28    private Boolean hasKids;
    2929
    3030    @Column(name = "housing")
     
    3535
    3636    @Column(name = "will_foster")
    37     private boolean willFoster;
     37    private Boolean willFoster;
    3838
    3939    @Column(name = "is_verified", nullable = false)
    40     private boolean verified;
     40    private Boolean verified;
    4141
    4242    @Column(name = "verified_by_employee")
    43     private int verifiedByEmployeeId;
     43    private Integer verifiedByEmployeeId;
    4444
    4545    public Adopter(LocalDate dateCreated, String name, String email, String password, String telephone,
    4646                   FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
    47                    PhysicalActivity physicalActivity, boolean willFoster, boolean verified, int verifiedByEmployeeId) {
     47                   PhysicalActivity physicalActivity, boolean willFoster, boolean verified) {
    4848        super(dateCreated, name, email, password, telephone);
    4949        this.freeTime = freeTime;
     
    5555        this.willFoster = willFoster;
    5656        this.verified = verified;
    57         this.verifiedByEmployeeId = verifiedByEmployeeId;
    5857    }
    5958
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.java

    r04e4f54 r9ee306b  
    1616
    1717    @Column(name = "id_shelter", nullable = false)
    18     private int shelterId;
     18    private Integer shelterId;
    1919
    2020    @Column(name = "is_verified", nullable = false)
     
    2222
    2323    @Column(name = "verified_by_admin")
    24     private int verifiedByAdminId;
     24    private Integer verifiedByAdminId;
    2525
    2626    public Employee(LocalDate dateCreated, String name, String email, String password, String telephone,
    27                     String position, int shelterId, boolean verified, int verifiedByAdminId) {
     27                    String position, int shelterId, boolean verified) {
    2828        super(dateCreated, name, email, password, telephone);
    2929        this.position = position;
    3030        this.shelterId = shelterId;
    3131        this.verified = verified;
    32         this.verifiedByAdminId = verifiedByAdminId;
    3332    }
    3433
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Shelter.java

    r04e4f54 r9ee306b  
    2121
    2222    @Column(name = "id_organisation")
    23     private int organisationId;
     23    private Integer organisationId;
    2424
    2525    @Column(name = "name_shelter", nullable = false, length = 100)
     
    2929    private String email;
    3030
    31     public Shelter(String address, String telephone, int organisationId, String name, String email) {
     31    public Shelter(String address, String telephone, Integer organisationId, String name, String email) {
    3232        this.address = address;
    3333        this.telephone = telephone;
  • Prototype Application/Paw5/src/main/java/finki/paw5/repository/AdopterRepository.java

    r04e4f54 r9ee306b  
    55import org.springframework.stereotype.Repository;
    66
     7
    78@Repository
    89public interface AdopterRepository extends JpaRepository<Adopter, Integer> {
  • Prototype Application/Paw5/src/main/java/finki/paw5/repository/EmployeeRepository.java

    r04e4f54 r9ee306b  
    22
    33import finki.paw5.model.entities.Employee;
     4import finki.paw5.model.entities.Shelter;
    45import org.springframework.data.jpa.repository.JpaRepository;
    56import org.springframework.stereotype.Repository;
     7
     8import java.util.List;
    69
    710@Repository
  • Prototype Application/Paw5/src/main/java/finki/paw5/repository/ShelterRepository.java

    r04e4f54 r9ee306b  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.List;
     8
    79@Repository
    810public interface ShelterRepository extends JpaRepository<Shelter, Integer> {
  • Prototype Application/Paw5/src/main/java/finki/paw5/service/AuthService.java

    r04e4f54 r9ee306b  
    44import finki.paw5.model.entities.Employee;
    55import finki.paw5.model.entities.User;
    6 
    7 import java.util.Optional;
     6import finki.paw5.model.enumerations.FreeTime;
     7import finki.paw5.model.enumerations.Funds;
     8import finki.paw5.model.enumerations.Housing;
     9import finki.paw5.model.enumerations.PhysicalActivity;
    810
    911public interface AuthService {
    1012    User login (String email, String password);
    11 //    Adopter registerAdopter(String password, String repeatPassword, String name, String email, String telephone);
    12 //    Employee registerEmployee(String password, String repeatPassword, String name, String email, String telephone);
     13    Adopter registerAdopter(String name, String email, String password, String telephone, FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing, PhysicalActivity physicalActivity, boolean willFoster);
     14    Employee registerEmployee(String name, String email, String password, String telephone, String position, Integer shelterId);
    1315
    1416}
Note: See TracChangeset for help on using the changeset viewer.