Changeset 15f8330
- Timestamp:
- 01/02/23 17:31:41 (23 months ago)
- Branches:
- main
- Children:
- 594d4c4
- Parents:
- 2a50a21
- 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 7 7 import javax.persistence.Column; 8 8 import javax.persistence.Entity; 9 import javax.persistence.JoinColumn; 10 import javax.persistence.ManyToOne; 9 11 import javax.validation.constraints.NotNull; 10 12 … … 14 16 @NoArgsConstructor 15 17 public 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; 19 21 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) { 21 23 super(firstname, lastname, username, email, password); 22 this.location id = locationid;24 this.location = location; 23 25 } 24 26 } -
FullyStocked/src/main/resources/application.properties
r2a50a21 r15f8330 1 1 2 server.port=9999 3 spring.profiles.active=prod 4 spring.jpa.properties.hibernate.default_schema=project
Note:
See TracChangeset
for help on using the changeset viewer.