<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="mateoModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  <EntityType Name="Attraction">
    <Key>
      <PropertyRef Name="IDAttraction" />
    </Key>
    <Property Name="IDAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="NameAttraction" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="Description" Type="String" MaxLength="400" FixedLength="false" Unicode="true" />
    <Property Name="QuantityAttraction" Type="Int32" Nullable="false" />
    <Property Name="Price" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
    <Property Name="FKType" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Type" Relationship="Self.FK_Attraction_Type" FromRole="Attraction" ToRole="Type" />
    <NavigationProperty Name="BookingAttraction" Relationship="Self.FK_BookingAttraction_Attraction" FromRole="Attraction" ToRole="BookingAttraction" />
  </EntityType>
  <EntityType Name="Booking">
    <Key>
      <PropertyRef Name="IDBooking" />
    </Key>
    <Property Name="IDBooking" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="DateBooking" Type="DateTime" Nullable="false" Precision="3" />
    <Property Name="Quantity" Type="Int32" Nullable="false" />
    <Property Name="FKUsers" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Users" Relationship="Self.FK_Booking_Users" FromRole="Booking" ToRole="Users" />
    <NavigationProperty Name="BookingAttraction" Relationship="Self.FK_BookingAttraction_Booking" FromRole="Booking" ToRole="BookingAttraction" />
  </EntityType>
  <EntityType Name="BookingAttraction">
    <Key>
      <PropertyRef Name="IDBookingAttraction" />
    </Key>
    <Property Name="IDBookingAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="FKBooking" Type="Int32" Nullable="false" />
    <Property Name="FKAttraction" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Attraction" Relationship="Self.FK_BookingAttraction_Attraction" FromRole="BookingAttraction" ToRole="Attraction" />
    <NavigationProperty Name="Booking" Relationship="Self.FK_BookingAttraction_Booking" FromRole="BookingAttraction" ToRole="Booking" />
  </EntityType>
  <EntityType Name="Card">
    <Key>
      <PropertyRef Name="IDCard" />
    </Key>
    <Property Name="IDCard" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="NumberCard" Type="String" MaxLength="19" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="Balance" Type="Decimal" Precision="19" Scale="4" />
    <NavigationProperty Name="Users" Relationship="Self.FK_Users_Card" FromRole="Card" ToRole="Users" />
  </EntityType>
  <EntityType Name="Employees">
    <Key>
      <PropertyRef Name="IDEmployees" />
    </Key>
    <Property Name="IDEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="FKRole" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Role" Relationship="Self.FK_Employees_Role" FromRole="Employees" ToRole="Role" />
  </EntityType>
  <EntityType Name="Role">
    <Key>
      <PropertyRef Name="IDRole" />
    </Key>
    <Property Name="IDRole" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Role1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_Role" FromRole="Role" ToRole="Employees" />
  </EntityType>
  <EntityType Name="sysdiagrams">
    <Key>
      <PropertyRef Name="diagram_id" />
    </Key>
    <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="principal_id" Type="Int32" Nullable="false" />
    <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="version" Type="Int32" />
    <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  </EntityType>
  <EntityType Name="Type">
    <Key>
      <PropertyRef Name="IDType" />
    </Key>
    <Property Name="IDType" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Type1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Type" FromRole="Type" ToRole="Attraction" />
  </EntityType>
  <EntityType Name="Users">
    <Key>
      <PropertyRef Name="IDUsers" />
    </Key>
    <Property Name="IDUsers" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
    <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="FKCard" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Booking" Relationship="Self.FK_Booking_Users" FromRole="Users" ToRole="Booking" />
    <NavigationProperty Name="Card" Relationship="Self.FK_Users_Card" FromRole="Users" ToRole="Card" />
  </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_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_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_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_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>
  <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>
  <EntityContainer Name="mateoEntities2" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="Attraction" EntityType="Self.Attraction" />
    <EntitySet Name="Booking" EntityType="Self.Booking" />
    <EntitySet Name="BookingAttraction" EntityType="Self.BookingAttraction" />
    <EntitySet Name="Card" EntityType="Self.Card" />
    <EntitySet Name="Employees" EntityType="Self.Employees" />
    <EntitySet Name="Role" EntityType="Self.Role" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
    <EntitySet Name="Type" EntityType="Self.Type" />
    <EntitySet Name="Users" EntityType="Self.Users" />
    <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
      <End Role="Type" EntitySet="Type" />
      <End Role="Attraction" EntitySet="Attraction" />
    </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_Booking_Users" Association="Self.FK_Booking_Users">
      <End Role="Users" EntitySet="Users" />
      <End Role="Booking" EntitySet="Booking" />
    </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_Users_Card" Association="Self.FK_Users_Card">
      <End Role="Card" EntitySet="Card" />
      <End Role="Users" EntitySet="Users" />
    </AssociationSet>
    <AssociationSet Name="FK_Employees_Role" Association="Self.FK_Employees_Role">
      <End Role="Role" EntitySet="Role" />
      <End Role="Employees" EntitySet="Employees" />
    </AssociationSet>
  </EntityContainer>
</Schema>