Changeset 15f8330


Ignore:
Timestamp:
01/02/23 17:31:41 (23 months ago)
Author:
Bojan <bojantrpeski123@…>
Branches:
main
Children:
594d4c4
Parents:
2a50a21
Message:

Application prod profile added and model change

Location:
FullyStocked/src/main
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • FullyStocked/src/main/java/com/bazi/fullystocked/Models/workers.java

    r2a50a21 r15f8330  
    77import javax.persistence.Column;
    88import javax.persistence.Entity;
     9import javax.persistence.JoinColumn;
     10import javax.persistence.ManyToOne;
    911import javax.validation.constraints.NotNull;
    1012
     
    1416@NoArgsConstructor
    1517public class workers extends User{
    16     @Column(nullable = false)
    17     @NotNull(message = "The worker must have location")
    18     private int locationid;
     18    @ManyToOne
     19    @JoinColumn(name = "locationid")
     20    private locations location;
    1921
    20     public workers(String firstname, String lastname, String username, String email, String password, int locationid) {
     22    public workers(String firstname, String lastname, String username, String email, String password, locations location) {
    2123        super(firstname, lastname, username, email, password);
    22         this.locationid = locationid;
     24        this.location = location;
    2325    }
    2426}
  • FullyStocked/src/main/resources/application.properties

    r2a50a21 r15f8330  
    11
     2server.port=9999
     3spring.profiles.active=prod
     4spring.jpa.properties.hibernate.default_schema=project
Note: See TracChangeset for help on using the changeset viewer.