Commit a9c7afcb authored by Shaphen Pangburn's avatar Shaphen Pangburn

[whole team]: Successfully seed and use CRU operations on seeded Objects

parent 38d030f7
package com.nisum.attendance.attendance.model; package com.nisum.attendance.attendance.model;
import com.sun.org.apache.xpath.internal.operations.Bool;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
...@@ -16,18 +15,21 @@ public class Attendance { ...@@ -16,18 +15,21 @@ public class Attendance {
private Long Id; private Long Id;
private Long studentId; private Long studentId;
Date attendanceDate; Date attendanceDate;
Bool didAttend; Boolean didAttend;
public Attendance(Date attendanceDate, Bool didAttend) { public Attendance(){}
public Attendance(Long studentId, Date attendanceDate, Boolean didAttend) {
this.studentId = studentId;
this.attendanceDate = attendanceDate; this.attendanceDate = attendanceDate;
this.didAttend = didAttend; this.didAttend = didAttend;
} }
public void setDidAttend(Bool didAttend) { public void setDidAttend(Boolean didAttend) {
this.didAttend = didAttend; this.didAttend = didAttend;
} }
public Bool getDidAttend() { public Boolean getDidAttend() {
return didAttend; return didAttend;
} }
......
...@@ -7,20 +7,13 @@ CREATE TABLE ATTENDANCE ( ...@@ -7,20 +7,13 @@ CREATE TABLE ATTENDANCE (
DID_ATTEND BOOLEAN DEFAULT FALSE DID_ATTEND BOOLEAN DEFAULT FALSE
); );
--CREATE TABLE tutorials_tbl ( INSERT INTO ATTENDANCE VALUES
-- id INT NOT NULL, (1, 10, '0001-02-01', TRUE),
-- title VARCHAR(50) NOT NULL, (2, 20, '0001-02-02', FALSE),
-- author VARCHAR(20) NOT NULL, (3, 30, '0001-02-03', TRUE),
-- submission_date DATE (4, 30, '0001-02-04', TRUE),
--); (5, 20, '0001-02-03', TRUE),
-- (6, 10, '0001-02-02', FALSE),
--INSERT INTO ATTENDANCE VALUES (7, 10, '0001-02-03', TRUE),
-- (1, 10, 0001-02-01, true), (8, 30, '0001-02-05', TRUE),
-- (2, 20, 0001-02-02, false), (9, 10, '0001-02-04', FALSE);
-- (3, 30, 0001-02-03, true), \ No newline at end of file
-- (4, 30, 0001-02-04, true),
-- (5, 20, 0001-02-03, true),
-- (6, 10, 0001-02-02, false),
-- (7, 10, 0001-02-03, true),
-- (8, 30, 0001-02-05, true),
-- (9, 10, 0001-02-04, false);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment