<?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="PriceOld" Type="Decimal" Precision="19" Scale="4" />
    <Property Name="PriceBaby" Type="Decimal" Precision="19" Scale="4" />
    <Property Name="QuantityAttraction" Type="Int32" Nullable="false" />
    <Property Name="ImageAttraction" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
    <Property Name="FKEmployees" Type="Int32" Nullable="false" />
    <Property Name="FKStatusAttraction" Type="Int32" Nullable="false" />
    <Property Name="FKType" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Employees" Relationship="Self.FK_Attraction_Employees" FromRole="Attraction" ToRole="Employees" />
    <NavigationProperty Name="StatusAttraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="Attraction" ToRole="StatusAttraction" />
    <NavigationProperty Name="Type" Relationship="Self.FK_Attraction_Type" FromRole="Attraction" ToRole="Type" />
    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Attraction" FromRole="Attraction" ToRole="Tickets" />
  </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" />
    <Property Name="FKStatusEmployees" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Employees" FromRole="Employees" ToRole="Attraction" />
    <NavigationProperty Name="Role" Relationship="Self.FK_Employees_Role" FromRole="Employees" ToRole="Role" />
    <NavigationProperty Name="StatusEmployees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="Employees" ToRole="StatusEmployees" />
  </EntityType>
  <EntityType Name="History">
    <Key>
      <PropertyRef Name="IDHistory" />
    </Key>
    <Property Name="IDHistory" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="FKUser" Type="Int32" Nullable="false" />
    <Property Name="DateTime" Type="DateTime" Nullable="false" Precision="3" />
    <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
    <NavigationProperty Name="Users" Relationship="Self.FK_History_Users" FromRole="History" ToRole="Users" />
  </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="StatusAttraction">
    <Key>
      <PropertyRef Name="IDStatusAttraction" />
    </Key>
    <Property Name="IDStatusAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="StatusAttraction1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="StatusAttraction" ToRole="Attraction" />
  </EntityType>
  <EntityType Name="StatusEmployees">
    <Key>
      <PropertyRef Name="IDStatusEmployees" />
    </Key>
    <Property Name="IDStatusEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="StatusEmployees1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="StatusEmployees" ToRole="Employees" />
  </EntityType>
  <EntityType Name="StatusPay">
    <Key>
      <PropertyRef Name="IDStatusPay" />
    </Key>
    <Property Name="IDStatusPay" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="StatusPay1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_StatusPay" FromRole="StatusPay" ToRole="Tickets" />
  </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="Tickets">
    <Key>
      <PropertyRef Name="IDTickets" />
    </Key>
    <Property Name="IDTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="FKUser" Type="Int32" Nullable="false" />
    <Property Name="FKAttraction" Type="Int32" Nullable="false" />
    <Property Name="FKTypeTickets" Type="Int32" Nullable="false" />
    <Property Name="FKStatusPuy" Type="Int32" Nullable="false" />
    <Property Name="Quantity" Type="Int32" Nullable="false" />
    <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
    <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
    <NavigationProperty Name="Attraction" Relationship="Self.FK_Tickets_Attraction" FromRole="Tickets" ToRole="Attraction" />
    <NavigationProperty Name="StatusPay" Relationship="Self.FK_Tickets_StatusPay" FromRole="Tickets" ToRole="StatusPay" />
    <NavigationProperty Name="TypeTickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="Tickets" ToRole="TypeTickets" />
    <NavigationProperty Name="Users" Relationship="Self.FK_Tickets_Users" FromRole="Tickets" ToRole="Users" />
  </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="TypeTickets">
    <Key>
      <PropertyRef Name="IDTypeTickets" />
    </Key>
    <Property Name="IDTypeTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="TypeTickets1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="TypeTickets" ToRole="Tickets" />
  </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="Card" Relationship="Self.FK_Users_Card" FromRole="Users" ToRole="Card" />
    <NavigationProperty Name="History" Relationship="Self.FK_History_Users" FromRole="Users" ToRole="History" />
    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
  </EntityType>
  <Association Name="FK_Attraction_Employees">
    <End Role="Employees" Type="Self.Employees" Multiplicity="1" />
    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employees">
        <PropertyRef Name="IDEmployees" />
      </Principal>
      <Dependent Role="Attraction">
        <PropertyRef Name="FKEmployees" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Attraction_StatusAttraction">
    <End Role="StatusAttraction" Type="Self.StatusAttraction" Multiplicity="1" />
    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="StatusAttraction">
        <PropertyRef Name="IDStatusAttraction" />
      </Principal>
      <Dependent Role="Attraction">
        <PropertyRef Name="FKStatusAttraction" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <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_Tickets_Attraction">
    <End Role="Attraction" Type="Self.Attraction" Multiplicity="1" />
    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Attraction">
        <PropertyRef Name="IDAttraction" />
      </Principal>
      <Dependent Role="Tickets">
        <PropertyRef Name="FKAttraction" />
      </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>
  <Association Name="FK_Employees_StatusEmployees">
    <End Role="StatusEmployees" Type="Self.StatusEmployees" Multiplicity="1" />
    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="StatusEmployees">
        <PropertyRef Name="IDStatusEmployees" />
      </Principal>
      <Dependent Role="Employees">
        <PropertyRef Name="FKStatusEmployees" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_History_Users">
    <End Role="Users" Type="Self.Users" Multiplicity="1" />
    <End Role="History" Type="Self.History" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Users">
        <PropertyRef Name="IDUsers" />
      </Principal>
      <Dependent Role="History">
        <PropertyRef Name="FKUser" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Tickets_StatusPay">
    <End Role="StatusPay" Type="Self.StatusPay" Multiplicity="1" />
    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="StatusPay">
        <PropertyRef Name="IDStatusPay" />
      </Principal>
      <Dependent Role="Tickets">
        <PropertyRef Name="FKStatusPuy" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Tickets_TypeTickets">
    <End Role="TypeTickets" Type="Self.TypeTickets" Multiplicity="1" />
    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="TypeTickets">
        <PropertyRef Name="IDTypeTickets" />
      </Principal>
      <Dependent Role="Tickets">
        <PropertyRef Name="FKTypeTickets" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Tickets_Users">
    <End Role="Users" Type="Self.Users" Multiplicity="1" />
    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Users">
        <PropertyRef Name="IDUsers" />
      </Principal>
      <Dependent Role="Tickets">
        <PropertyRef Name="FKUser" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="mateoEntities" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="Attraction" EntityType="Self.Attraction" />
    <EntitySet Name="Card" EntityType="Self.Card" />
    <EntitySet Name="Employees" EntityType="Self.Employees" />
    <EntitySet Name="History" EntityType="Self.History" />
    <EntitySet Name="Role" EntityType="Self.Role" />
    <EntitySet Name="StatusAttraction" EntityType="Self.StatusAttraction" />
    <EntitySet Name="StatusEmployees" EntityType="Self.StatusEmployees" />
    <EntitySet Name="StatusPay" EntityType="Self.StatusPay" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
    <EntitySet Name="Tickets" EntityType="Self.Tickets" />
    <EntitySet Name="Type" EntityType="Self.Type" />
    <EntitySet Name="TypeTickets" EntityType="Self.TypeTickets" />
    <EntitySet Name="Users" EntityType="Self.Users" />
    <AssociationSet Name="FK_Attraction_Employees" Association="Self.FK_Attraction_Employees">
      <End Role="Employees" EntitySet="Employees" />
      <End Role="Attraction" EntitySet="Attraction" />
    </AssociationSet>
    <AssociationSet Name="FK_Attraction_StatusAttraction" Association="Self.FK_Attraction_StatusAttraction">
      <End Role="StatusAttraction" EntitySet="StatusAttraction" />
      <End Role="Attraction" EntitySet="Attraction" />
    </AssociationSet>
    <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
      <End Role="Type" EntitySet="Type" />
      <End Role="Attraction" EntitySet="Attraction" />
    </AssociationSet>
    <AssociationSet Name="FK_Tickets_Attraction" Association="Self.FK_Tickets_Attraction">
      <End Role="Attraction" EntitySet="Attraction" />
      <End Role="Tickets" EntitySet="Tickets" />
    </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>
    <AssociationSet Name="FK_Employees_StatusEmployees" Association="Self.FK_Employees_StatusEmployees">
      <End Role="StatusEmployees" EntitySet="StatusEmployees" />
      <End Role="Employees" EntitySet="Employees" />
    </AssociationSet>
    <AssociationSet Name="FK_History_Users" Association="Self.FK_History_Users">
      <End Role="Users" EntitySet="Users" />
      <End Role="History" EntitySet="History" />
    </AssociationSet>
    <AssociationSet Name="FK_Tickets_StatusPay" Association="Self.FK_Tickets_StatusPay">
      <End Role="StatusPay" EntitySet="StatusPay" />
      <End Role="Tickets" EntitySet="Tickets" />
    </AssociationSet>
    <AssociationSet Name="FK_Tickets_TypeTickets" Association="Self.FK_Tickets_TypeTickets">
      <End Role="TypeTickets" EntitySet="TypeTickets" />
      <End Role="Tickets" EntitySet="Tickets" />
    </AssociationSet>
    <AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
      <End Role="Users" EntitySet="Users" />
      <End Role="Tickets" EntitySet="Tickets" />
    </AssociationSet>
  </EntityContainer>
</Schema>