﻿<?xml version="1.0" encoding="utf-8"?><Database Name="stockholm_db" Class="StockholmDbDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
  <Connection Mode="AppSettings" ConnectionString="Data Source=.\SQLExpress;Initial Catalog=stockholm_db;Integrated Security=True" SettingsObjectName="StockholmLibrary.Properties.Settings" SettingsPropertyName="stockholm_dbConnectionString" Provider="System.Data.SqlClient" />
  <Table Name="dbo.Badges" Member="Badges">
    <Type Name="Badge">
      <Column Name="BadgeID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="BadgeName" Type="System.String" DbType="VarChar(10) NOT NULL" CanBeNull="false" />
      <Column Name="RoleID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Association Name="Role_Badge" Member="Role" ThisKey="RoleID" OtherKey="RoleID" Type="Role" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.Vouchers" Member="Vouchers">
    <Type Name="Voucher">
      <Column Name="Code" Type="System.String" DbType="VarChar(15) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="PayloadType" Type="System.String" DbType="VarChar(10) NOT NULL" CanBeNull="false" />
      <Column Name="Payload" Type="System.String" DbType="VarChar(30) NOT NULL" CanBeNull="false" />
    </Type>
  </Table>
  <Table Name="dbo.Furni" Member="Furnis">
    <Type Name="Furni">
      <Column Name="FurniID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="DefinitionID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="RoomID" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="PositionX" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="PositionY" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="PositionZ" Type="System.Double" DbType="Float" CanBeNull="true" />
      <Column Name="Orientation" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="OwnerID" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Association Name="Furni_Furni" Member="Furni2" ThisKey="FurniID" OtherKey="FurniID" Type="Furni" Cardinality="One" />
      <Association Name="Furni_Furni" Member="Furni1" ThisKey="FurniID" OtherKey="FurniID" Type="Furni" IsForeignKey="true" />
      <Association Name="FurniDefinition_Furni" Member="FurniDefinition" ThisKey="DefinitionID" OtherKey="DefinitionID" Type="FurniDefinition" IsForeignKey="true" />
      <Association Name="Room_Furni" Member="Room" ThisKey="RoomID" OtherKey="RoomID" Type="Room" IsForeignKey="true" />
      <Association Name="User_Furni" Member="User" ThisKey="OwnerID" OtherKey="UserID" Type="User" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.FurniDefinitions" Member="FurniDefinitions">
    <Type Name="FurniDefinition">
      <Column Name="DefinitionID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="PhysicsObjectID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Sprite" Type="System.String" DbType="NVarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="Colour" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
      <Column Name="CanBeTraded" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="FurniType" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Association Name="FurniDefinition_Furni" Member="Furnis" ThisKey="DefinitionID" OtherKey="DefinitionID" Type="Furni" />
      <Association Name="PhysicsObject_FurniDefinition" Member="PhysicsObject" ThisKey="PhysicsObjectID" OtherKey="PhysicsID" Type="PhysicsObject" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.PhysicsObjects" Member="PhysicsObjects">
    <Type Name="PhysicsObject">
      <Column Name="PhysicsID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="PhysicsName" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="Width" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Length" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Height" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
      <Column Name="ActionHeight" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
      <Column Name="IsPathable" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Association Name="PhysicsObject_FurniDefinition" Member="FurniDefinitions" ThisKey="PhysicsID" OtherKey="PhysicsObjectID" Type="FurniDefinition" />
    </Type>
  </Table>
  <Table Name="dbo.RoleAccess" Member="RoleAccesses">
    <Type Name="RoleAccess">
      <Column Name="RoleAccessID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="RoleID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="AccessName" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Association Name="Role_RoleAccess" Member="Role" ThisKey="RoleID" OtherKey="RoleID" Type="Role" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.Roles" Member="Roles">
    <Type Name="Role">
      <Column Name="RoleID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="RoleName" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="InheritedRole" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Association Name="Role_Badge" Member="Badges" ThisKey="RoleID" OtherKey="RoleID" Type="Badge" />
      <Association Name="Role_RoleAccess" Member="RoleAccesses" ThisKey="RoleID" OtherKey="RoleID" Type="RoleAccess" />
      <Association Name="Role_User" Member="Users" ThisKey="RoleID" OtherKey="RoleID" Type="User" />
    </Type>
  </Table>
  <Table Name="dbo.RoomCategories" Member="RoomCategories">
    <Type Name="RoomCategory">
      <Column Name="RoomCategoryID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="RoomCategoryName" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="RoomCategoryParent" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="CanTrade" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="IsVisible" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Column Name="CategoryOrder" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="SystemCategory" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
      <Association Name="RoomCategory_RoomCategory" Member="RoomCategories" ThisKey="RoomCategoryID" OtherKey="RoomCategoryParent" Type="RoomCategory" />
      <Association Name="RoomCategory_Room" Member="Rooms" ThisKey="RoomCategoryID" OtherKey="CategoryID" Type="Room" />
      <Association Name="RoomCategory_RoomCategory" Member="RoomCategory1" ThisKey="RoomCategoryParent" OtherKey="RoomCategoryID" Type="RoomCategory" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.RoomModels" Member="RoomModels">
    <Type Name="RoomModel">
      <Column Name="RoomModelID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="ModelName" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="NavigatorName" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="CCTList" Type="System.String" DbType="VarChar(500)" CanBeNull="true" />
      <Column Name="StartX" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="StartY" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="StartZ" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="MaxAscend" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
      <Column Name="MaxDescend" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
      <Column Name="DefaultHeightmap" Type="System.String" DbType="VarChar(8000) NOT NULL" CanBeNull="false" />
      <Column Name="AdditionalECs" Type="System.String" DbType="NVarChar(25)" CanBeNull="true" />
      <Association Name="RoomModel_Room" Member="Rooms" ThisKey="RoomModelID" OtherKey="ModelID" Type="Room" />
    </Type>
  </Table>
  <Table Name="dbo.Rooms" Member="Rooms">
    <Type Name="Room">
      <Column Name="RoomID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="RoomName" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="RoomFriendlyName" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
      <Column Name="RoomDescription" Type="System.String" DbType="VarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="ModelID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="OwnerID" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="FloorID" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="WallpaperID" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="CategoryID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="MaxGuests" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="RoomStatus" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="ShowOwner" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="SuperUsers" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
      <Column Name="Password" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Association Name="Room_Furni" Member="Furnis" ThisKey="RoomID" OtherKey="RoomID" Type="Furni" />
      <Association Name="RoomCategory_Room" Member="RoomCategory" ThisKey="CategoryID" OtherKey="RoomCategoryID" Type="RoomCategory" IsForeignKey="true" />
      <Association Name="RoomModel_Room" Member="RoomModel" ThisKey="ModelID" OtherKey="RoomModelID" Type="RoomModel" IsForeignKey="true" />
      <Association Name="RoomState_Room" Member="RoomState" ThisKey="RoomStatus" OtherKey="StatusID" Type="RoomState" IsForeignKey="true" />
      <Association Name="User_Room" Member="User" ThisKey="OwnerID" OtherKey="UserID" Type="User" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.RoomStates" Member="RoomStates">
    <Type Name="RoomState">
      <Column Name="StatusID" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="StatusName" Type="System.String" DbType="NVarChar(15) NOT NULL" CanBeNull="false" />
      <Association Name="RoomState_Room" Member="Rooms" ThisKey="StatusID" OtherKey="RoomStatus" Type="Room" />
    </Type>
  </Table>
  <Table Name="dbo.Settings" Member="Settings">
    <Type Name="Setting">
      <Column Name="SettingsVersion" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="DatabaseVersion" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    </Type>
  </Table>
  <Table Name="dbo.Users" Member="Users">
    <Type Name="User">
      <Column Name="UserID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="Username" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="Password" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="RoleID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Sex" Type="System.String" DbType="VarChar(1) NOT NULL" CanBeNull="false" />
      <Column Name="Figure" Type="System.String" DbType="VarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="Motto" Type="System.String" DbType="VarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="Email" Type="System.String" DbType="VarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="Dob" Type="System.String" DbType="VarChar(500) NOT NULL" CanBeNull="false" />
      <Column Name="Credits" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Tickets" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="Film" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="PoolFigure" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="ClubDaysRemaining" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="ClubMonthsRemaining" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="ClubMonthsElapsed" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="CurrentBadge" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
      <Column Name="LastLogin" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Association Name="User_Furni" Member="Furnis" ThisKey="UserID" OtherKey="OwnerID" Type="Furni" />
      <Association Name="User_Room" Member="Rooms" ThisKey="UserID" OtherKey="OwnerID" Type="Room" />
      <Association Name="Role_User" Member="Role" ThisKey="RoleID" OtherKey="RoleID" Type="Role" IsForeignKey="true" />
    </Type>
  </Table>
</Database>