Changeset 594d4c4
- Timestamp:
- 01/02/23 19:08:56 (2 years ago)
- Branches:
- main
- Children:
- 5c142f7
- Parents:
- 15f8330
- Location:
- FullyStocked/src/main/java/com/bazi/fullystocked/Models
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
FullyStocked/src/main/java/com/bazi/fullystocked/Models/AnswerId.java
r15f8330 r594d4c4 4 4 import lombok.Setter; 5 5 6 import javax.persistence. Embeddable;6 import javax.persistence.*; 7 7 import java.io.Serializable; 8 import java.util.Objects; 9 8 10 @Embeddable 9 11 @Getter 10 12 @Setter 11 13 public class AnswerId implements Serializable { 12 private Long answerid; 13 private Long questionid; 14 @GeneratedValue(strategy = GenerationType.IDENTITY) 15 private Integer answerid; 16 @ManyToOne 17 @JoinColumn(name="questionid") 18 private questions question; 19 @Override 20 public boolean equals(Object o) { 21 if (this == o) return true; 22 if (o == null || getClass() != o.getClass()) return false; 23 AnswerId answerId = (AnswerId) o; 24 return answerid.equals(answerId.answerid) && question.equals(answerId.question); 25 } 26 27 @Override 28 public int hashCode() { 29 return Objects.hash(answerid, question); 30 } 14 31 15 32 -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/User.java
r15f8330 r594d4c4 16 16 @Id 17 17 @GeneratedValue(strategy = GenerationType.IDENTITY) 18 private Longuserid;18 private Integer userid; 19 19 @Column(nullable = false) 20 20 @NotNull(message = "The user must have an first name") … … 36 36 @NotNull(message = "The user must have an password") 37 37 @NotEmpty(message = "The user must have an password") 38 private String password;38 private String userpassword; 39 39 40 40 public User(String firstname, String lastname, String username, String email, String password) { … … 43 43 this.username = username; 44 44 this.email = email; 45 this. password = password;45 this.userpassword = password; 46 46 } 47 47 -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/answers.java
r15f8330 r594d4c4 5 5 import lombok.NoArgsConstructor; 6 6 7 import javax.persistence.Column; 8 import javax.persistence.EmbeddedId; 9 import javax.persistence.Entity; 7 import javax.persistence.*; 10 8 import javax.validation.constraints.NotEmpty; 11 9 import javax.validation.constraints.NotNull; -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/articles.java
r15f8330 r594d4c4 15 15 @NoArgsConstructor 16 16 public class articles { 17 18 19 private Longarticleid;20 21 22 23 17 @Id 18 @GeneratedValue(strategy = GenerationType.IDENTITY) 19 private Integer articleid; 20 @Column(nullable = false) 21 @NotNull(message = "Article must have description") 22 @NotEmpty(message = "Article must have description") 23 private String description; 24 24 @Column(nullable = false) 25 25 @NotNull(message = "Article must have name") … … 29 29 @Column(nullable = false) 30 30 @NotNull(message = "Article must have max quantity") 31 @NotEmpty(message = "Article must have max quantity")32 31 private int maxquantityperlocation; 33 32 @ManyToMany -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/categories.java
r15f8330 r594d4c4 16 16 @Id 17 17 @GeneratedValue(strategy = GenerationType.IDENTITY) 18 private Longcategoryid;18 private Integer categoryid; 19 19 @Column(nullable = false) 20 20 @NotNull(message = "Category must have name") -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/invoicedarticles.java
r15f8330 r594d4c4 15 15 @Id 16 16 @GeneratedValue(strategy = GenerationType.IDENTITY) 17 private Longiarticleid;17 private Integer iarticleid; 18 18 @Column(nullable = false) 19 19 @NotNull(message = "Invoiced Article must have price") 20 @NotEmpty(message = "Invoiced Article must have price")21 20 @Min(0) 22 21 private int price; 23 22 @Column(nullable = false) 24 23 @NotNull(message = "Invoiced Article must have quantity") 25 @NotEmpty(message = "Invoiced Article must have quantity")26 24 @Min(0) 27 25 private int quantity; -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/invoices.java
r15f8330 r594d4c4 15 15 @Id 16 16 @GeneratedValue(strategy = GenerationType.IDENTITY) 17 private Longinvoiceid;17 private Integer invoiceid; 18 18 @Column(nullable = false) 19 19 @NotNull(message = "Invoice must have customer name") … … 30 30 @Column(nullable = false) 31 31 @NotNull(message = "Invoice must have customer street number") 32 @NotEmpty(message = "Invoice must have customer street number")33 32 private int streetnumber; 34 33 @Column(nullable = false) … … 38 37 @Column(nullable = false) 39 38 @NotNull(message = "Invoice must have creation date") 40 @NotEmpty(message = "Invoice must have creation date")41 39 private LocalDateTime datecreate; 42 40 @ManyToOne -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/locations.java
r15f8330 r594d4c4 14 14 @Id 15 15 @GeneratedValue(strategy = GenerationType.IDENTITY) 16 private Longlocationid;16 private Integer locationid; 17 17 @Column(nullable = false) 18 18 @NotNull(message = "Location must have name") … … 29 29 @Column(nullable = false) 30 30 @NotNull(message = "Location must have street number") 31 @NotEmpty(message = "Location must have street number") 32 private String streetnumber; 31 private Integer streetnumber; 33 32 @Column(nullable = false) 34 33 @NotNull(message = "Location must have city") … … 36 35 private String city; 37 36 38 public locations(String locationname, String phone, String street, Stringstreetnumber, String city) {37 public locations(String locationname, String phone, String street, Integer streetnumber, String city) { 39 38 this.locationname = locationname; 40 39 this.phone = phone; -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/orderedarticles.java
r15f8330 r594d4c4 16 16 @Id 17 17 @GeneratedValue(strategy = GenerationType.IDENTITY) 18 private Long oarticleid; 19 @Column(nullable = false) 20 @NotNull(message = "Ordered Article must have price") 21 @NotEmpty(message = "Ordered Article must have price") 18 private Integer oarticleid; 22 19 @Min(0) 23 20 private int price; 24 21 @Column(nullable = false) 25 22 @NotNull(message = "Ordered Article must have quantity") 26 @NotEmpty(message = "Ordered Article must have quantity")27 23 @Min(0) 28 24 private int quantity; … … 32 28 private String articlestatus; 33 29 @ManyToOne 34 @JoinColumn(name = "or ederid")30 @JoinColumn(name = "orderid") 35 31 private orders order; 36 32 @ManyToOne -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/orders.java
r15f8330 r594d4c4 15 15 @Id 16 16 @GeneratedValue(strategy = GenerationType.IDENTITY) 17 private Long orederid;17 private Integer orderid; 18 18 @Column(nullable = false) 19 19 @NotNull(message = "Order must have status") … … 24 24 @Column(nullable = false) 25 25 @NotNull(message = "Order must have creation date") 26 @NotEmpty(message = "Order must have creation date")27 26 private LocalDateTime datecreated; 28 27 private LocalDateTime dateapproved; -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/questions.java
r15f8330 r594d4c4 17 17 @Id 18 18 @GeneratedValue(strategy = GenerationType.IDENTITY) 19 private Longquestionid;19 private Integer questionid; 20 20 @Column(nullable = false) 21 21 @NotNull(message = "Question must have content") … … 24 24 @Column(nullable = false) 25 25 @NotNull(message = "Question must have creation date") 26 @NotEmpty(message = "Question must have creation date")27 26 private LocalDateTime datecreated; 28 27 @ManyToOne -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/storedarticles.java
r15f8330 r594d4c4 17 17 @Id 18 18 @GeneratedValue(strategy = GenerationType.IDENTITY) 19 private Longsarticleid;19 private Integer sarticleid; 20 20 @Column(nullable = false) 21 21 @NotNull(message = "Stored Article must have quantity") 22 @NotEmpty(message = "Stored Article must have quantity")23 22 @Min(0) 24 23 private int quantity; -
FullyStocked/src/main/java/com/bazi/fullystocked/Models/suppliers.java
r15f8330 r594d4c4 30 30 @Column(nullable = false) 31 31 @NotNull(message = "Supplier must have street number") 32 @NotEmpty(message = "Supplier must have street number") 33 private int sttreetnumber; 32 private int streetnumber; 34 33 @Column(nullable = false) 35 34 @NotNull(message = "Supplier must have street city") … … 48 47 this.phone = phone; 49 48 this.street = street; 50 this.st treetnumber = sttreetnumber;49 this.streetnumber = sttreetnumber; 51 50 this.city = city; 52 51 }
Note:
See TracChangeset
for help on using the changeset viewer.