123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- <?xml version="1.0" encoding="utf-8"?>
- <Schema Namespace="gr672_pgvModel" 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="Employee">
- <Key>
- <PropertyRef Name="EmployeeID" />
- </Key>
- <Property Name="EmployeeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="MiddleName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Code" Type="String" MaxLength="5" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_EmployeeInStore_Employee" FromRole="Employee" ToRole="EmployeeInStore" />
- </EntityType>
- <EntityType Name="Order">
- <Key>
- <PropertyRef Name="OrderID" />
- </Key>
- <Property Name="OrderID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
- <Property Name="IDWorkShift" Type="Int32" Nullable="false" />
- <Property Name="State" Type="Boolean" Nullable="false" />
- <NavigationProperty Name="PaymentOrder" Relationship="Self.FK_PaymentOrder_Order" FromRole="Order" ToRole="PaymentOrder" />
- <NavigationProperty Name="ProductInOrder" Relationship="Self.FK_ProductInOrder_Order" FromRole="Order" ToRole="ProductInOrder" />
- <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
- </EntityType>
- <EntityType Name="PaymentMetod">
- <Key>
- <PropertyRef Name="PaymentMetodID" />
- </Key>
- <Property Name="PaymentMetodID" Type="Int32" Nullable="false" />
- <Property Name="PaymentMetodName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="PaymentOrder" Relationship="Self.FK_PaymentOrder_PaymentMetod" FromRole="PaymentMetod" ToRole="PaymentOrder" />
- </EntityType>
- <EntityType Name="PaymentOrder">
- <Key>
- <PropertyRef Name="PaymentID" />
- </Key>
- <Property Name="PaymentID" Type="Int32" Nullable="false" />
- <Property Name="IDPaymentMetod" Type="Int32" Nullable="false" />
- <Property Name="IDOrder" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Order" Relationship="Self.FK_PaymentOrder_Order" FromRole="PaymentOrder" ToRole="Order" />
- <NavigationProperty Name="PaymentMetod" Relationship="Self.FK_PaymentOrder_PaymentMetod" FromRole="PaymentOrder" ToRole="PaymentMetod" />
- </EntityType>
- <EntityType Name="Product">
- <Key>
- <PropertyRef Name="ProductID" />
- </Key>
- <Property Name="ProductID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="NameProduct" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Weight" Type="Int32" Nullable="false" />
- <Property Name="Packaging" Type="Int32" Nullable="false" />
- <Property Name="PriceOfOne" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
- <Property Name="BarCode" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="ProductInStore" Relationship="Self.FK_ProductInStore_Product" FromRole="Product" ToRole="ProductInStore" />
- </EntityType>
- <EntityType Name="ProductInOrder">
- <Key>
- <PropertyRef Name="IDOrder" />
- <PropertyRef Name="IDProduct" />
- </Key>
- <Property Name="IDOrder" Type="Int32" Nullable="false" />
- <Property Name="IDProduct" Type="Int32" Nullable="false" />
- <Property Name="AmountProduct" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Order" Relationship="Self.FK_ProductInOrder_Order" FromRole="ProductInOrder" ToRole="Order" />
- <NavigationProperty Name="ProductInStore" Relationship="Self.FK_ProductInOrder_ProductInStore" FromRole="ProductInOrder" ToRole="ProductInStore" />
- </EntityType>
- <EntityType Name="ProductInStore">
- <Key>
- <PropertyRef Name="ProductInStoreID" />
- </Key>
- <Property Name="ProductInStoreID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="IDStore" Type="Int32" Nullable="false" />
- <Property Name="IDProduct" Type="Int32" Nullable="false" />
- <Property Name="RemainsProduct" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Product" Relationship="Self.FK_ProductInStore_Product" FromRole="ProductInStore" ToRole="Product" />
- <NavigationProperty Name="ProductInOrder" Relationship="Self.FK_ProductInOrder_ProductInStore" FromRole="ProductInStore" ToRole="ProductInOrder" />
- <NavigationProperty Name="Store" Relationship="Self.FK_ProductInStore_Store" FromRole="ProductInStore" ToRole="Store" />
- </EntityType>
- <EntityType Name="Store">
- <Key>
- <PropertyRef Name="StoreID" />
- </Key>
- <Property Name="StoreID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="Address" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="ProductInStore" Relationship="Self.FK_ProductInStore_Store" FromRole="Store" ToRole="ProductInStore" />
- <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Store" ToRole="Cashier" />
- <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_EmployeeInStore_Store" FromRole="Store" ToRole="EmployeeInStore" />
- </EntityType>
- <Association Name="FK_PaymentOrder_Order">
- <End Role="Order" Type="Self.Order" Multiplicity="1" />
- <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Order">
- <PropertyRef Name="OrderID" />
- </Principal>
- <Dependent Role="PaymentOrder">
- <PropertyRef Name="IDOrder" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_ProductInOrder_Order">
- <End Role="Order" Type="Self.Order" Multiplicity="1" />
- <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Order">
- <PropertyRef Name="OrderID" />
- </Principal>
- <Dependent Role="ProductInOrder">
- <PropertyRef Name="IDOrder" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_PaymentOrder_PaymentMetod">
- <End Role="PaymentMetod" Type="Self.PaymentMetod" Multiplicity="1" />
- <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="PaymentMetod">
- <PropertyRef Name="PaymentMetodID" />
- </Principal>
- <Dependent Role="PaymentOrder">
- <PropertyRef Name="IDPaymentMetod" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_ProductInStore_Product">
- <End Role="Product" Type="Self.Product" Multiplicity="1" />
- <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Product">
- <PropertyRef Name="ProductID" />
- </Principal>
- <Dependent Role="ProductInStore">
- <PropertyRef Name="IDProduct" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_ProductInOrder_ProductInStore">
- <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="1" />
- <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="ProductInStore">
- <PropertyRef Name="ProductInStoreID" />
- </Principal>
- <Dependent Role="ProductInOrder">
- <PropertyRef Name="IDProduct" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_ProductInStore_Store">
- <End Role="Store" Type="Self.Store" Multiplicity="1" />
- <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Store">
- <PropertyRef Name="StoreID" />
- </Principal>
- <Dependent Role="ProductInStore">
- <PropertyRef Name="IDStore" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
- <EntitySet Name="Employee" EntityType="Self.Employee" />
- <EntitySet Name="Order" EntityType="Self.Order" />
- <EntitySet Name="PaymentMetod" EntityType="Self.PaymentMetod" />
- <EntitySet Name="PaymentOrder" EntityType="Self.PaymentOrder" />
- <EntitySet Name="Product" EntityType="Self.Product" />
- <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" />
- <EntitySet Name="ProductInStore" EntityType="Self.ProductInStore" />
- <EntitySet Name="Store" EntityType="Self.Store" />
- <AssociationSet Name="FK_PaymentOrder_Order" Association="Self.FK_PaymentOrder_Order">
- <End Role="Order" EntitySet="Order" />
- <End Role="PaymentOrder" EntitySet="PaymentOrder" />
- </AssociationSet>
- <AssociationSet Name="FK_ProductInOrder_Order" Association="Self.FK_ProductInOrder_Order">
- <End Role="Order" EntitySet="Order" />
- <End Role="ProductInOrder" EntitySet="ProductInOrder" />
- </AssociationSet>
- <AssociationSet Name="FK_PaymentOrder_PaymentMetod" Association="Self.FK_PaymentOrder_PaymentMetod">
- <End Role="PaymentMetod" EntitySet="PaymentMetod" />
- <End Role="PaymentOrder" EntitySet="PaymentOrder" />
- </AssociationSet>
- <AssociationSet Name="FK_ProductInStore_Product" Association="Self.FK_ProductInStore_Product">
- <End Role="Product" EntitySet="Product" />
- <End Role="ProductInStore" EntitySet="ProductInStore" />
- </AssociationSet>
- <AssociationSet Name="FK_ProductInOrder_ProductInStore" Association="Self.FK_ProductInOrder_ProductInStore">
- <End Role="ProductInStore" EntitySet="ProductInStore" />
- <End Role="ProductInOrder" EntitySet="ProductInOrder" />
- </AssociationSet>
- <AssociationSet Name="FK_ProductInStore_Store" Association="Self.FK_ProductInStore_Store">
- <End Role="Store" EntitySet="Store" />
- <End Role="ProductInStore" EntitySet="ProductInStore" />
- </AssociationSet>
- <EntitySet Name="Cashier" EntityType="gr672_pgvModel.Cashier" />
- <AssociationSet Name="FK_Cashier_Store" Association="gr672_pgvModel.FK_Cashier_Store">
- <End Role="Store" EntitySet="Store" />
- <End Role="Cashier" EntitySet="Cashier" />
- </AssociationSet>
- <EntitySet Name="EmployeeInStore" EntityType="gr672_pgvModel.EmployeeInStore" />
- <AssociationSet Name="FK_EmployeeInStore_Employee" Association="gr672_pgvModel.FK_EmployeeInStore_Employee">
- <End Role="Employee" EntitySet="Employee" />
- <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
- </AssociationSet>
- <AssociationSet Name="FK_EmployeeInStore_Store" Association="gr672_pgvModel.FK_EmployeeInStore_Store">
- <End Role="Store" EntitySet="Store" />
- <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
- </AssociationSet>
- <EntitySet Name="WorkShift" EntityType="gr672_pgvModel.WorkShift" />
- <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
- <End Role="Cashier" EntitySet="Cashier" />
- <End Role="WorkShift" EntitySet="WorkShift" />
- </AssociationSet>
- <AssociationSet Name="FK_WorkShift_EmployeeInStore" Association="gr672_pgvModel.FK_WorkShift_EmployeeInStore">
- <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
- <End Role="WorkShift" EntitySet="WorkShift" />
- </AssociationSet>
- <AssociationSet Name="FK_Order_WorkShift" Association="gr672_pgvModel.FK_Order_WorkShift">
- <End Role="WorkShift" EntitySet="WorkShift" />
- <End Role="Order" EntitySet="Order" />
- </AssociationSet>
- </EntityContainer>
- <EntityType Name="Cashier">
- <Key>
- <PropertyRef Name="CashierID" />
- </Key>
- <Property Name="CashierID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="IDStore" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Store" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Cashier" ToRole="Store" />
- <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="Cashier" ToRole="WorkShift" />
- </EntityType>
- <Association Name="FK_Cashier_Store">
- <End Type="gr672_pgvModel.Store" Role="Store" Multiplicity="1" />
- <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Store">
- <PropertyRef Name="StoreID" />
- </Principal>
- <Dependent Role="Cashier">
- <PropertyRef Name="IDStore" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <EntityType Name="EmployeeInStore">
- <Key>
- <PropertyRef Name="IDEmployeeInStore" />
- </Key>
- <Property Name="IDStore" Type="Int32" Nullable="false" />
- <Property Name="IDEmployee" Type="Int32" Nullable="false" />
- <Property Name="IDEmployeeInStore" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <NavigationProperty Name="Employee" Relationship="gr672_pgvModel.FK_EmployeeInStore_Employee" FromRole="EmployeeInStore" ToRole="Employee" />
- <NavigationProperty Name="Store" Relationship="gr672_pgvModel.FK_EmployeeInStore_Store" FromRole="EmployeeInStore" ToRole="Store" />
- <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="EmployeeInStore" ToRole="WorkShift" />
- </EntityType>
- <Association Name="FK_EmployeeInStore_Employee">
- <End Type="gr672_pgvModel.Employee" Role="Employee" Multiplicity="1" />
- <End Type="gr672_pgvModel.EmployeeInStore" Role="EmployeeInStore" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Employee">
- <PropertyRef Name="EmployeeID" />
- </Principal>
- <Dependent Role="EmployeeInStore">
- <PropertyRef Name="IDEmployee" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_EmployeeInStore_Store">
- <End Type="gr672_pgvModel.Store" Role="Store" Multiplicity="1" />
- <End Type="gr672_pgvModel.EmployeeInStore" Role="EmployeeInStore" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Store">
- <PropertyRef Name="StoreID" />
- </Principal>
- <Dependent Role="EmployeeInStore">
- <PropertyRef Name="IDStore" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <EntityType Name="WorkShift">
- <Key>
- <PropertyRef Name="WorkShiftID" />
- </Key>
- <Property Name="WorkShiftID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="IDCashier" Type="Int32" Nullable="false" />
- <Property Name="IDEmployee" Type="Int32" Nullable="false" />
- <Property Name="StartDateAndTimeWork" Type="DateTime" Precision="3" />
- <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
- <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
- <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="WorkShift" ToRole="EmployeeInStore" />
- <NavigationProperty Name="Order" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
- </EntityType>
- <Association Name="FK_WorkShift_Cashier">
- <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
- <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Cashier">
- <PropertyRef Name="CashierID" />
- </Principal>
- <Dependent Role="WorkShift">
- <PropertyRef Name="IDCashier" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_WorkShift_EmployeeInStore">
- <End Type="gr672_pgvModel.EmployeeInStore" Role="EmployeeInStore" Multiplicity="1" />
- <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="EmployeeInStore">
- <PropertyRef Name="IDEmployeeInStore" />
- </Principal>
- <Dependent Role="WorkShift">
- <PropertyRef Name="IDEmployee" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Order_WorkShift">
- <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="1" />
- <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="WorkShift">
- <PropertyRef Name="WorkShiftID" />
- </Principal>
- <Dependent Role="Order">
- <PropertyRef Name="IDWorkShift" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- </Schema>
|