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;
import com.sun.org.apache.xpath.internal.operations.Bool;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
......@@ -16,18 +15,21 @@ public class Attendance {
private Long Id;
private Long studentId;
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.didAttend = didAttend;
}
public void setDidAttend(Bool didAttend) {
public void setDidAttend(Boolean didAttend) {
this.didAttend = didAttend;
}
public Bool getDidAttend() {
public Boolean getDidAttend() {
return didAttend;
}
......
......@@ -7,20 +7,13 @@ CREATE TABLE ATTENDANCE (
DID_ATTEND BOOLEAN DEFAULT FALSE
);
--CREATE TABLE tutorials_tbl (
-- id INT NOT NULL,
-- title VARCHAR(50) NOT NULL,
-- author VARCHAR(20) NOT NULL,
-- submission_date DATE
--);
--
--INSERT INTO ATTENDANCE VALUES
-- (1, 10, 0001-02-01, true),
-- (2, 20, 0001-02-02, false),
-- (3, 30, 0001-02-03, true),
-- (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
INSERT INTO ATTENDANCE VALUES
(1, 10, '0001-02-01', TRUE),
(2, 20, '0001-02-02', FALSE),
(3, 30, '0001-02-03', TRUE),
(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