<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="Хранилище mateoModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityType Name="Attraction">
    <Key>
      <PropertyRef Name="IDAttraction" />
    </Key>
    <Property Name="IDAttraction" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="NameAttraction" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="400" />
    <Property Name="QuantityAttraction" Type="int" Nullable="false" />
    <Property Name="Price" Type="money" Nullable="false" />
    <Property Name="FKType" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Booking">
    <Key>
      <PropertyRef Name="IDBooking" />
    </Key>
    <Property Name="IDBooking" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="DateBooking" Type="datetime" Nullable="false" />
    <Property Name="Quantity" Type="int" Nullable="false" />
    <Property Name="FKUsers" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BookingAttraction">
    <Key>
      <PropertyRef Name="IDBookingAttraction" />
    </Key>
    <Property Name="IDBookingAttraction" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="FKBooking" Type="int" Nullable="false" />
    <Property Name="FKAttraction" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Card">
    <Key>
      <PropertyRef Name="IDCard" />
    </Key>
    <Property Name="IDCard" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="NumberCard" Type="nvarchar" MaxLength="19" Nullable="false" />
    <Property Name="Balance" Type="money" />
  </EntityType>
  <EntityType Name="Employees">
    <Key>
      <PropertyRef Name="IDEmployees" />
    </Key>
    <Property Name="IDEmployees" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="LastName" Type="nvarchar" MaxLength="25" Nullable="false" />
    <Property Name="FirstName" Type="nvarchar" MaxLength="25" Nullable="false" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="25" />
    <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="FKRole" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Role">
    <Key>
      <PropertyRef Name="IDRole" />
    </Key>
    <Property Name="IDRole" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Role" Type="nvarchar" MaxLength="25" Nullable="false" />
  </EntityType>
  <EntityType Name="sysdiagrams">
    <Key>
      <PropertyRef Name="diagram_id" />
    </Key>
    <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="principal_id" Type="int" Nullable="false" />
    <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="version" Type="int" />
    <Property Name="definition" Type="varbinary(max)" />
  </EntityType>
  <EntityType Name="Type">
    <Key>
      <PropertyRef Name="IDType" />
    </Key>
    <Property Name="IDType" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Type" Type="nvarchar" MaxLength="20" Nullable="false" />
  </EntityType>
  <EntityType Name="Users">
    <Key>
      <PropertyRef Name="IDUsers" />
    </Key>
    <Property Name="IDUsers" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="LastName" Type="nvarchar" MaxLength="25" Nullable="false" />
    <Property Name="FirstName" Type="nvarchar" MaxLength="25" Nullable="false" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="25" />
    <Property Name="Image" Type="varbinary(max)" />
    <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="FKCard" Type="int" Nullable="false" />
  </EntityType>
  <Association Name="FK_Attraction_Type">
    <End Role="Type" Type="Self.Type" Multiplicity="1" />
    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Type">
        <PropertyRef Name="IDType" />
      </Principal>
      <Dependent Role="Attraction">
        <PropertyRef Name="FKType" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Booking_Users">
    <End Role="Users" Type="Self.Users" Multiplicity="1" />
    <End Role="Booking" Type="Self.Booking" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Users">
        <PropertyRef Name="IDUsers" />
      </Principal>
      <Dependent Role="Booking">
        <PropertyRef Name="FKUsers" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BookingAttraction_Attraction">
    <End Role="Attraction" Type="Self.Attraction" Multiplicity="1" />
    <End Role="BookingAttraction" Type="Self.BookingAttraction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Attraction">
        <PropertyRef Name="IDAttraction" />
      </Principal>
      <Dependent Role="BookingAttraction">
        <PropertyRef Name="FKAttraction" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BookingAttraction_Booking">
    <End Role="Booking" Type="Self.Booking" Multiplicity="1" />
    <End Role="BookingAttraction" Type="Self.BookingAttraction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Booking">
        <PropertyRef Name="IDBooking" />
      </Principal>
      <Dependent Role="BookingAttraction">
        <PropertyRef Name="FKBooking" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Employees_Role">
    <End Role="Role" Type="Self.Role" Multiplicity="1" />
    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Role">
        <PropertyRef Name="IDRole" />
      </Principal>
      <Dependent Role="Employees">
        <PropertyRef Name="FKRole" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Users_Card">
    <End Role="Card" Type="Self.Card" Multiplicity="1" />
    <End Role="Users" Type="Self.Users" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Card">
        <PropertyRef Name="IDCard" />
      </Principal>
      <Dependent Role="Users">
        <PropertyRef Name="FKCard" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="Хранилище mateoModelContainer">
    <EntitySet Name="Attraction" EntityType="Self.Attraction" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Booking" EntityType="Self.Booking" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BookingAttraction" EntityType="Self.BookingAttraction" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Card" EntityType="Self.Card" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Role" EntityType="Self.Role" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Type" EntityType="Self.Type" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
    <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
      <End Role="Type" EntitySet="Type" />
      <End Role="Attraction" EntitySet="Attraction" />
    </AssociationSet>
    <AssociationSet Name="FK_Booking_Users" Association="Self.FK_Booking_Users">
      <End Role="Users" EntitySet="Users" />
      <End Role="Booking" EntitySet="Booking" />
    </AssociationSet>
    <AssociationSet Name="FK_BookingAttraction_Attraction" Association="Self.FK_BookingAttraction_Attraction">
      <End Role="Attraction" EntitySet="Attraction" />
      <End Role="BookingAttraction" EntitySet="BookingAttraction" />
    </AssociationSet>
    <AssociationSet Name="FK_BookingAttraction_Booking" Association="Self.FK_BookingAttraction_Booking">
      <End Role="Booking" EntitySet="Booking" />
      <End Role="BookingAttraction" EntitySet="BookingAttraction" />
    </AssociationSet>
    <AssociationSet Name="FK_Employees_Role" Association="Self.FK_Employees_Role">
      <End Role="Role" EntitySet="Role" />
      <End Role="Employees" EntitySet="Employees" />
    </AssociationSet>
    <AssociationSet Name="FK_Users_Card" Association="Self.FK_Users_Card">
      <End Role="Card" EntitySet="Card" />
      <End Role="Users" EntitySet="Users" />
    </AssociationSet>
  </EntityContainer>
</Schema>