CREATE TABLE pigeonholes (
	pigeonhole_id int NOT NULL ,
	maximum_mark int NOT NULL ,
	date_open TIMESTAMP,
	date_deadline TIMESTAMP,
	date_penalty TIMESTAMP,
	CONSTRAINT PK_pigeonholes PRIMARY KEY
	(
		pigeonhole_id
	),
	CONSTRAINT FK_pigeonholes_to_resources FOREIGN KEY
	(
		pigeonhole_id
	) REFERENCES resources (
		resource_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(33, 10, 'building2', 'pigeonholes', 'org.bodington.assessment.PigeonHole')
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(33, 1, 'pigeonhole_id', 'setPigeonHoleId', 'getPigeonHoleId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 1, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(33, 2, 'maximum_mark', 'setMaximumMark', 'getMaximumMark', 'int', 'int', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(33, 3, 'date_open', 'setDateOpen', 'getDateOpen', 'java.sql.Timestamp', 'java.sql.Timestamp', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(33, 4, 'date_deadline', 'setDateDeadline', 'getDateDeadline', 'java.sql.Timestamp', 'java.sql.Timestamp', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(33, 5, 'date_penalty', 'setDatePenalty', 'getDatePenalty', 'java.sql.Timestamp', 'java.sql.Timestamp', 0, null, null, null )
GO



