﻿<?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.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="Role_User" Member="Role" ThisKey="RoleID" OtherKey="RoleID" Type="Role" IsForeignKey="true" />
    </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_User" Member="Users" ThisKey="RoleID" OtherKey="RoleID" Type="User" />
      <Association Name="Role_RoleAccess" Member="RoleAccesses" ThisKey="RoleID" OtherKey="RoleID" Type="RoleAccess" />
    </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>
</Database>