CREATE TABLE messaging_rooms (
	messaging_room_id int NOT NULL ,
	type_of_room int NOT NULL ,
	CONSTRAINT PK_messaging_rooms PRIMARY KEY
	(
		messaging_room_id
	),
	CONSTRAINT FK_mess_rooms_to_resources FOREIGN KEY
	(
		messaging_room_id
	) REFERENCES resources (
		resource_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(25, 10, 'building2', 'messaging_rooms', 'org.bodington.messaging.MessagingRoom')
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(25, 1, 'messaging_room_id', 'setMessagingRoomId', 'getMessagingRoomId', '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(25, 2, 'type_of_room', 'setTypeOfRoom', 'getTypeOfRoom', 'int', 'int', 0, null, null, null )
GO


