CREATE TABLE user_file_events (
	user_file_event_id int NOT NULL ,
	file_entry_id int ,
	file_size numeric(20) ,
	file_name varchar(64) ,
	CONSTRAINT PK_user_file_events PRIMARY KEY
	(
		user_file_event_id
	),
	CONSTRAINT FK_user_file_events_to_events FOREIGN KEY
	(
		user_file_event_id
	) REFERENCES events (
		event_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(22,	14, 'building2', 'user_file_events', 'org.bodington.server.events.UserFileEvent')
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(22, 1, 'user_file_event_id', 'setUserFileEventId', 'getUserFileEventId', '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(22, 2, 'file_entry_id', 'setFileEntryId', 'getFileEntryId', 'java.lang.Integer', 'java.lang.Integer', 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(22, 3, 'file_size', 'setFileSize', 'getFileSize', 'java.math.BigInteger', 'java.math.BigInteger', 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(22, 4, 'file_name', 'setFileName', 'getFileName', 'java.lang.String', 'java.lang.String', 0, null, null, null )
GO

