CREATE TABLE textq_papers (
	textq_paper_id int NOT NULL ,
	general_notes_big_string_id int NOT NULL ,
	general_available int NOT NULL ,
	general_weight decimal(6,3) NOT NULL ,
	maximum_mark int NOT NULL ,
	date_open TIMESTAMP,
	date_deadline TIMESTAMP,
	date_penalty TIMESTAMP,
	CONSTRAINT PK_textq_papers PRIMARY KEY
	(
		textq_paper_id
	),
	CONSTRAINT FK_textq_papers_to_resources FOREIGN KEY
	(
		textq_paper_id
	) REFERENCES resources (
		resource_id
	),
	CONSTRAINT FK_tp_notes_to_big_strings FOREIGN KEY
	(
		general_notes_big_string_id
	) REFERENCES big_strings (
		big_string_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(41, 10, 'building2', 'textq_papers', 'org.bodington.assessment.TextQPaper')
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(41, 1, 'textq_paper_id', 'setTextQPaperId', 'getTextQPaperId', '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(41, 2, 'general_notes_big_string_id', 'setGeneralNotesBigStringId', 'getGeneralNotesBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(41, 3, 'general_available', 'setGeneralAvailable', 'getGeneralAvailable', '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(41, 4, 'general_weight', 'setGeneralWeight', 'getGeneralWeight', 'java.math.BigDecimal', 'java.math.BigDecimal', 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(41, 5, '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(41, 6, '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(41, 7, '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(41, 8, 'date_penalty', 'setDatePenalty', 'getDatePenalty', 'java.sql.Timestamp', 'java.sql.Timestamp', 0, null, null, null )
GO



