diff --git a/.DS_Store b/.DS_Store index f13cca2..570ad46 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 590a92c..9cd79b1 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,26 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser + + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/brcm/.idea/dbnavigator.xml b/brcm/.idea/dbnavigator.xml new file mode 100644 index 0000000..472f9c9 --- /dev/null +++ b/brcm/.idea/dbnavigator.xml @@ -0,0 +1,514 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/brcm/.idea/jpa-buddy.xml b/brcm/.idea/jpa-buddy.xml index 9141cf2..e0c77ab 100644 --- a/brcm/.idea/jpa-buddy.xml +++ b/brcm/.idea/jpa-buddy.xml @@ -1,9 +1,7 @@ - - \ No newline at end of file diff --git a/brcm/.jpb/persistence-units.xml b/brcm/.jpb/persistence-units.xml deleted file mode 100644 index 6b67a65..0000000 --- a/brcm/.jpb/persistence-units.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Activity.java b/brcm/core/src/main/java/entities/Activity.java new file mode 100644 index 0000000..8f0cf38 --- /dev/null +++ b/brcm/core/src/main/java/entities/Activity.java @@ -0,0 +1,43 @@ +package entities; + +import javax.persistence.*; + +@Entity +@Table(name = "activities") +public class Activity { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Lob + @Column(name = "name", nullable = false) + private String name; + + @Column(name = "price", nullable = false) + private Double price; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Address.java b/brcm/core/src/main/java/entities/Address.java new file mode 100644 index 0000000..d985f24 --- /dev/null +++ b/brcm/core/src/main/java/entities/Address.java @@ -0,0 +1,79 @@ +package entities; + +import javax.persistence.*; + +@Entity +@Table(name = "addresses") +public class Address { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Lob + @Column(name = "street", nullable = false) + private String street; + + @Lob + @Column(name = "number", nullable = false) + private String number; + + @Column(name = "zipcode", nullable = false) + private Integer zipcode; + + @Lob + @Column(name = "city", nullable = false) + private String city; + + @Lob + @Column(name = "state", nullable = false) + private String state; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public Integer getZipcode() { + return zipcode; + } + + public void setZipcode(Integer zipcode) { + this.zipcode = zipcode; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Appointment.java b/brcm/core/src/main/java/entities/Appointment.java new file mode 100644 index 0000000..8b98c1e --- /dev/null +++ b/brcm/core/src/main/java/entities/Appointment.java @@ -0,0 +1,68 @@ +package entities; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.time.Instant; + +@Entity +@Table(name = "appointments") +public class Appointment { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Column(name = "starttime", nullable = false) + private Instant starttime; + + @Column(name = "endtime", nullable = false) + private Instant endtime; + + @Column(name = "activityid", nullable = false) + private Integer activityid; + + @Column(name = "customerid", nullable = false) + private Integer customerid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Instant getStarttime() { + return starttime; + } + + public void setStarttime(Instant starttime) { + this.starttime = starttime; + } + + public Instant getEndtime() { + return endtime; + } + + public void setEndtime(Instant endtime) { + this.endtime = endtime; + } + + public Integer getActivityid() { + return activityid; + } + + public void setActivityid(Integer activityid) { + this.activityid = activityid; + } + + public Integer getCustomerid() { + return customerid; + } + + public void setCustomerid(Integer customerid) { + this.customerid = customerid; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Customer.java b/brcm/core/src/main/java/entities/Customer.java new file mode 100644 index 0000000..af5f8d1 --- /dev/null +++ b/brcm/core/src/main/java/entities/Customer.java @@ -0,0 +1,80 @@ +package entities; + +import javax.persistence.*; +import java.time.LocalDate; + +@Entity +@Table(name = "customers") +public class Customer { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Lob + @Column(name = "firstname", nullable = false) + private String firstname; + + @Lob + @Column(name = "lastname", nullable = false) + private String lastname; + + @Column(name = "dateofbirth", nullable = false) + private LocalDate dateofbirth; + + @Lob + @Column(name = "phone", nullable = false) + private String phone; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "addressid", nullable = false) + private Address addressid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public LocalDate getDateofbirth() { + return dateofbirth; + } + + public void setDateofbirth(LocalDate dateofbirth) { + this.dateofbirth = dateofbirth; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Address getAddressid() { + return addressid; + } + + public void setAddressid(Address addressid) { + this.addressid = addressid; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Discountscheme.java b/brcm/core/src/main/java/entities/Discountscheme.java new file mode 100644 index 0000000..ac773fa --- /dev/null +++ b/brcm/core/src/main/java/entities/Discountscheme.java @@ -0,0 +1,77 @@ +package entities; + +import javax.persistence.*; +import java.time.LocalDate; + +@Entity +@Table(name = "discountscheme") +public class Discountscheme { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Column(name = "pricediscount", nullable = false) + private Double pricediscount; + + @Column(name = "percentdiscount", nullable = false) + private Double percentdiscount; + + @Lob + @Column(name = "customertype", nullable = false) + private String customertype; + + @Column(name = "startdate", nullable = false) + private LocalDate startdate; + + @Column(name = "enddate", nullable = false) + private LocalDate enddate; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Double getPricediscount() { + return pricediscount; + } + + public void setPricediscount(Double pricediscount) { + this.pricediscount = pricediscount; + } + + public Double getPercentdiscount() { + return percentdiscount; + } + + public void setPercentdiscount(Double percentdiscount) { + this.percentdiscount = percentdiscount; + } + + public String getCustomertype() { + return customertype; + } + + public void setCustomertype(String customertype) { + this.customertype = customertype; + } + + public LocalDate getStartdate() { + return startdate; + } + + public void setStartdate(LocalDate startdate) { + this.startdate = startdate; + } + + public LocalDate getEnddate() { + return enddate; + } + + public void setEnddate(LocalDate enddate) { + this.enddate = enddate; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Historicalprice.java b/brcm/core/src/main/java/entities/Historicalprice.java new file mode 100644 index 0000000..0602f63 --- /dev/null +++ b/brcm/core/src/main/java/entities/Historicalprice.java @@ -0,0 +1,55 @@ +package entities; + +import javax.persistence.*; +import java.time.LocalDate; + +@Entity +@Table(name = "historicalprice") +public class Historicalprice { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Column(name = "date", nullable = false) + private LocalDate date; + + @Column(name = "price", nullable = false) + private Double price; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "activityid", nullable = false) + private Activity activityid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public Activity getActivityid() { + return activityid; + } + + public void setActivityid(Activity activityid) { + this.activityid = activityid; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Lineitem.java b/brcm/core/src/main/java/entities/Lineitem.java new file mode 100644 index 0000000..2f7af38 --- /dev/null +++ b/brcm/core/src/main/java/entities/Lineitem.java @@ -0,0 +1,67 @@ +package entities; + +import javax.persistence.*; + +@Entity +@Table(name = "lineitems") +public class Lineitem { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "activityid", nullable = false) + private Activity activityid; + + @Column(name = "quantity", nullable = false) + private Integer quantity; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "appointmentid", nullable = false) + private Appointment appointmentid; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "orderid", nullable = false) + private Order orderid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Activity getActivityid() { + return activityid; + } + + public void setActivityid(Activity activityid) { + this.activityid = activityid; + } + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Appointment getAppointmentid() { + return appointmentid; + } + + public void setAppointmentid(Appointment appointmentid) { + this.appointmentid = appointmentid; + } + + public Order getOrderid() { + return orderid; + } + + public void setOrderid(Order orderid) { + this.orderid = orderid; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Order.java b/brcm/core/src/main/java/entities/Order.java new file mode 100644 index 0000000..00fe507 --- /dev/null +++ b/brcm/core/src/main/java/entities/Order.java @@ -0,0 +1,91 @@ +package entities; + +import javax.persistence.*; +import java.time.LocalDate; +import java.time.LocalTime; + +@Entity +@Table(name = "orders") +public class Order { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @Column(name = "date", nullable = false) + private LocalDate date; + + @Column(name = "\"time\"", nullable = false) + private LocalTime time; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "customerid", nullable = false) + private Customer customerid; + + @Column(name = "discountapplied", nullable = false) + private Double discountapplied; + + @Lob + @Column(name = "totalprice", nullable = false) + private String totalprice; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "discountschemeid", nullable = false) + private Discountscheme discountschemeid; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public LocalTime getTime() { + return time; + } + + public void setTime(LocalTime time) { + this.time = time; + } + + public Customer getCustomerid() { + return customerid; + } + + public void setCustomerid(Customer customerid) { + this.customerid = customerid; + } + + public Double getDiscountapplied() { + return discountapplied; + } + + public void setDiscountapplied(Double discountapplied) { + this.discountapplied = discountapplied; + } + + public String getTotalprice() { + return totalprice; + } + + public void setTotalprice(String totalprice) { + this.totalprice = totalprice; + } + + public Discountscheme getDiscountschemeid() { + return discountschemeid; + } + + public void setDiscountschemeid(Discountscheme discountschemeid) { + this.discountschemeid = discountschemeid; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Professor.java b/brcm/core/src/main/java/entities/Professor.java new file mode 100644 index 0000000..856023c --- /dev/null +++ b/brcm/core/src/main/java/entities/Professor.java @@ -0,0 +1,69 @@ +package entities; + +import javax.persistence.*; + +@Entity +@Table(name = "professors") +public class Professor { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @MapsId + @OneToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "id", nullable = false) + private Customer customers; + + @Lob + @Column(name = "department", nullable = false) + private String department; + + @Lob + @Column(name = "office", nullable = false) + private String office; + + @Lob + @Column(name = "research", nullable = false) + private String research; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Customer getCustomers() { + return customers; + } + + public void setCustomers(Customer customers) { + this.customers = customers; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getOffice() { + return office; + } + + public void setOffice(String office) { + this.office = office; + } + + public String getResearch() { + return research; + } + + public void setResearch(String research) { + this.research = research; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/entities/Student.java b/brcm/core/src/main/java/entities/Student.java new file mode 100644 index 0000000..6795eaf --- /dev/null +++ b/brcm/core/src/main/java/entities/Student.java @@ -0,0 +1,80 @@ +package entities; + +import javax.persistence.*; +import java.time.LocalDate; + +@Entity +@Table(name = "students") +public class Student { + @Id + @Column(name = "id", nullable = false) + private Integer id; + + @MapsId + @OneToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "id", nullable = false) + private Customer customers; + + @Column(name = "enterdate", nullable = false) + private LocalDate enterdate; + + @Lob + @Column(name = "major", nullable = false) + private String major; + + @Lob + @Column(name = "minor", nullable = false) + private String minor; + + @Column(name = "graddate", nullable = false) + private LocalDate graddate; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Customer getCustomers() { + return customers; + } + + public void setCustomers(Customer customers) { + this.customers = customers; + } + + public LocalDate getEnterdate() { + return enterdate; + } + + public void setEnterdate(LocalDate enterdate) { + this.enterdate = enterdate; + } + + public String getMajor() { + return major; + } + + public void setMajor(String major) { + this.major = major; + } + + public String getMinor() { + return minor; + } + + public void setMinor(String minor) { + this.minor = minor; + } + + public LocalDate getGraddate() { + return graddate; + } + + public void setGraddate(LocalDate graddate) { + this.graddate = graddate; + } + +} \ No newline at end of file diff --git a/brcm/core/src/main/java/org/cpp/App.java b/brcm/core/src/main/java/org/cpp/App.java deleted file mode 100644 index 79fc204..0000000 --- a/brcm/core/src/main/java/org/cpp/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.cpp; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/brcm/core/src/main/java/org/cpp/Customer.java b/brcm/core/src/main/java/org/cpp/Customer.java deleted file mode 100644 index 6919a4c..0000000 --- a/brcm/core/src/main/java/org/cpp/Customer.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.cpp; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - -@Entity -@Table(name = "customer") -public class Customer { - @Id - @Column(name = "id", nullable = false) - private Integer id; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - - @Column(name = "first_name", nullable = false) - private String firstName; - - public String getFirstName() { - return firstName; - } - - public void setId(String firstName) { - this.firstName = firstName; - } -} \ No newline at end of file diff --git a/brcm/web/src/main/java/org/cpp/App.java b/brcm/web/src/main/java/org/cpp/App.java deleted file mode 100644 index 79fc204..0000000 --- a/brcm/web/src/main/java/org/cpp/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.cpp; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/docs/brcm_sql.architect b/docs/brcm_sql.architect index ed9aa85..b7ddeff 100644 --- a/docs/brcm_sql.architect +++ b/docs/brcm_sql.architect @@ -4,12 +4,21 @@ - + + + + + + + + + + - + @@ -20,9 +29,492 @@ - - - + + + + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
@@ -30,31 +522,352 @@
- +
- - + + + + + + + + + + + - + - + - - - + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
- + - + + + + + + + + + + + + + + + + + + + @@ -103,7 +916,7 @@ - + diff --git a/docs/brcm_sql.architect~ b/docs/brcm_sql.architect~ index e16745e..f756285 100644 --- a/docs/brcm_sql.architect~ +++ b/docs/brcm_sql.architect~ @@ -9,7 +9,7 @@ - + @@ -20,489 +20,489 @@ - - - - + + + +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -513,13 +513,352 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + @@ -568,7 +907,7 @@ - +