|
@@ -0,0 +1,955 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
|
|
+ <!-- EF Runtime content -->
|
|
|
+ <edmx:Runtime>
|
|
|
+ <!-- SSDL content -->
|
|
|
+ <edmx:StorageModels>
|
|
|
+ <Schema Namespace="Хранилище user1Model" 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="Agent">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
|
|
|
+ <Property Name="AgentTypeID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Address" Type="nvarchar" MaxLength="300" />
|
|
|
+ <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
|
|
|
+ <Property Name="KPP" Type="varchar" MaxLength="9" />
|
|
|
+ <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
|
|
|
+ <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
|
|
|
+ <Property Name="Email" Type="nvarchar" MaxLength="255" />
|
|
|
+ <Property Name="Logo" Type="nvarchar" MaxLength="100" />
|
|
|
+ <Property Name="Priority" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="AgentPriorityHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="AgentID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="datetime" Nullable="false" />
|
|
|
+ <Property Name="PriorityValue" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="AgentType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Image" Type="nvarchar" MaxLength="100" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Material">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
|
|
|
+ <Property Name="CountInPack" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Unit" Type="nvarchar" MaxLength="10" Nullable="false" />
|
|
|
+ <Property Name="CountInStock" Type="float" />
|
|
|
+ <Property Name="MinCount" Type="float" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="nvarchar(max)" />
|
|
|
+ <Property Name="Cost" Type="decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ <Property Name="Image" Type="nvarchar" MaxLength="100" />
|
|
|
+ <Property Name="MaterialTypeID" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="MaterialCountHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="MaterialID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="datetime" Nullable="false" />
|
|
|
+ <Property Name="CountValue" Type="float" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="MaterialSupplier">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ <PropertyRef Name="SupplierID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="MaterialID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="SupplierID" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="MaterialType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="DefectedPercent" Type="float" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Product">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
|
|
|
+ <Property Name="ProductTypeID" Type="int" />
|
|
|
+ <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="nvarchar(max)" />
|
|
|
+ <Property Name="Image" Type="nvarchar" MaxLength="100" />
|
|
|
+ <Property Name="ProductionPersonCount" Type="int" />
|
|
|
+ <Property Name="ProductionWorkshopNumber" Type="int" />
|
|
|
+ <Property Name="MinCostForAgent" Type="decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductCostHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="ProductID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="datetime" Nullable="false" />
|
|
|
+ <Property Name="CostValue" Type="decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductMaterial">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ProductID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="MaterialID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Count" Type="float" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductSale">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="AgentID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="ProductID" Type="int" Nullable="false" />
|
|
|
+ <Property Name="SaleDate" Type="date" Nullable="false" />
|
|
|
+ <Property Name="ProductCount" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="DefectedPercent" Type="float" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Shop">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
|
|
|
+ <Property Name="Address" Type="nvarchar" MaxLength="300" />
|
|
|
+ <Property Name="AgentID" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Supplier">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
|
|
|
+ <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
|
|
|
+ <Property Name="StartDate" Type="date" Nullable="false" />
|
|
|
+ <Property Name="QualityRating" Type="int" />
|
|
|
+ <Property Name="SupplierType" Type="nvarchar" MaxLength="20" />
|
|
|
+ </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>
|
|
|
+ <Association Name="FK_Agent_AgentType">
|
|
|
+ <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="AgentType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Agent">
|
|
|
+ <PropertyRef Name="AgentTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_AgentPriorityHistory_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="AgentPriorityHistory" Type="Self.AgentPriorityHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="AgentPriorityHistory">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Material_MaterialType">
|
|
|
+ <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="MaterialType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Material">
|
|
|
+ <PropertyRef Name="MaterialTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_MaterialCountHistory_Material">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="1" />
|
|
|
+ <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Material">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="MaterialCountHistory">
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_MaterialSupplier_Material">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="1" />
|
|
|
+ <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Material">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="MaterialSupplier">
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_MaterialSupplier_Supplier">
|
|
|
+ <End Role="Supplier" Type="Self.Supplier" Multiplicity="1" />
|
|
|
+ <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Supplier">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="MaterialSupplier">
|
|
|
+ <PropertyRef Name="SupplierID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Product_ProductType">
|
|
|
+ <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="ProductType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Product">
|
|
|
+ <PropertyRef Name="ProductTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductCostHistory_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductCostHistory">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductMaterial_Material">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="1" />
|
|
|
+ <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Material">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductMaterial">
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductMaterial_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductMaterial">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductSale_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductSale">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductSale_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductSale">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Shop_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Shop">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <EntityContainer Name="Хранилище user1ModelContainer">
|
|
|
+ <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Material" EntityType="Self.Material" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="MaterialSupplier" EntityType="Self.MaterialSupplier" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="MaterialType" EntityType="Self.MaterialType" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Shop" EntityType="Self.Shop" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Supplier" EntityType="Self.Supplier" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
|
|
|
+ <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
|
|
|
+ <End Role="AgentType" EntitySet="AgentType" />
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
|
|
|
+ <End Role="MaterialType" EntitySet="MaterialType" />
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_MaterialSupplier_Material" Association="Self.FK_MaterialSupplier_Material">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_MaterialSupplier_Supplier" Association="Self.FK_MaterialSupplier_Supplier">
|
|
|
+ <End Role="Supplier" EntitySet="Supplier" />
|
|
|
+ <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
|
|
|
+ <End Role="ProductType" EntitySet="ProductType" />
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="ProductMaterial" EntitySet="ProductMaterial" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductMaterial" EntitySet="ProductMaterial" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="ProductSale" EntitySet="ProductSale" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductSale" EntitySet="ProductSale" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="Shop" EntitySet="Shop" />
|
|
|
+ </AssociationSet>
|
|
|
+ </EntityContainer>
|
|
|
+ </Schema>
|
|
|
+ </edmx:StorageModels>
|
|
|
+ <!-- CSDL content -->
|
|
|
+ <edmx:ConceptualModels>
|
|
|
+ <Schema Namespace="user1Model" 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="Agent">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
|
|
|
+ <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Priority" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="AgentType" Relationship="Self.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
|
|
|
+ <NavigationProperty Name="AgentPriorityHistory" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="Agent" ToRole="AgentPriorityHistory" />
|
|
|
+ <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
|
|
|
+ <NavigationProperty Name="Shop" Relationship="Self.FK_Shop_Agent" FromRole="Agent" ToRole="Shop" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="AgentPriorityHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="AgentID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
+ <Property Name="PriorityValue" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Agent" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="AgentPriorityHistory" ToRole="Agent" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="AgentType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
|
|
+ <NavigationProperty Name="Agent" Relationship="Self.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Material">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="CountInPack" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Unit" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="CountInStock" Type="Double" />
|
|
|
+ <Property Name="MinCount" Type="Double" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Cost" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="MaterialTypeID" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="MaterialType" Relationship="Self.FK_Material_MaterialType" FromRole="Material" ToRole="MaterialType" />
|
|
|
+ <NavigationProperty Name="MaterialCountHistory" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="Material" ToRole="MaterialCountHistory" />
|
|
|
+ <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Material" FromRole="Material" ToRole="ProductMaterial" />
|
|
|
+ <NavigationProperty Name="Supplier" Relationship="Self.MaterialSupplier" FromRole="Material" ToRole="Supplier" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="MaterialCountHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="MaterialID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
+ <Property Name="CountValue" Type="Double" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Material" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="MaterialCountHistory" ToRole="Material" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="MaterialType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="DefectedPercent" Type="Double" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Material" Relationship="Self.FK_Material_MaterialType" FromRole="MaterialType" ToRole="Material" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Product">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="ProductTypeID" Type="Int32" />
|
|
|
+ <Property Name="ArticleNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="ProductionPersonCount" Type="Int32" />
|
|
|
+ <Property Name="ProductionWorkshopNumber" Type="Int32" />
|
|
|
+ <Property Name="MinCostForAgent" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ <NavigationProperty Name="ProductType" Relationship="Self.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
|
|
|
+ <NavigationProperty Name="ProductCostHistory" Relationship="Self.FK_ProductCostHistory_Product" FromRole="Product" ToRole="ProductCostHistory" />
|
|
|
+ <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Product" FromRole="Product" ToRole="ProductMaterial" />
|
|
|
+ <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductCostHistory">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="ProductID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
+ <Property Name="CostValue" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Product" Relationship="Self.FK_ProductCostHistory_Product" FromRole="ProductCostHistory" ToRole="Product" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductMaterial">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ProductID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="MaterialID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Count" Type="Double" />
|
|
|
+ <NavigationProperty Name="Material" Relationship="Self.FK_ProductMaterial_Material" FromRole="ProductMaterial" ToRole="Material" />
|
|
|
+ <NavigationProperty Name="Product" Relationship="Self.FK_ProductMaterial_Product" FromRole="ProductMaterial" ToRole="Product" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductSale">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="AgentID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="ProductID" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
|
|
|
+ <Property Name="ProductCount" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Agent" Relationship="Self.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
|
|
|
+ <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="ProductType">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="DefectedPercent" Type="Double" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Shop">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="AgentID" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Agent" Relationship="Self.FK_Shop_Agent" FromRole="Shop" ToRole="Agent" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Supplier">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
|
|
|
+ <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
|
|
|
+ <Property Name="QualityRating" Type="Int32" />
|
|
|
+ <Property Name="SupplierType" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
|
|
+ <NavigationProperty Name="Material" Relationship="Self.MaterialSupplier" FromRole="Supplier" ToRole="Material" />
|
|
|
+ </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>
|
|
|
+ <Association Name="FK_Agent_AgentType">
|
|
|
+ <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="AgentType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Agent">
|
|
|
+ <PropertyRef Name="AgentTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_AgentPriorityHistory_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="AgentPriorityHistory" Type="Self.AgentPriorityHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="AgentPriorityHistory">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductSale_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductSale">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Shop_Agent">
|
|
|
+ <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
|
|
|
+ <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Agent">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Shop">
|
|
|
+ <PropertyRef Name="AgentID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Material_MaterialType">
|
|
|
+ <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="MaterialType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Material">
|
|
|
+ <PropertyRef Name="MaterialTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_MaterialCountHistory_Material">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="1" />
|
|
|
+ <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Material">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="MaterialCountHistory">
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductMaterial_Material">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="1" />
|
|
|
+ <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Material">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductMaterial">
|
|
|
+ <PropertyRef Name="MaterialID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Product_ProductType">
|
|
|
+ <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="ProductType">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Product">
|
|
|
+ <PropertyRef Name="ProductTypeID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductCostHistory_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductCostHistory">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductMaterial_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductMaterial">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_ProductSale_Product">
|
|
|
+ <End Role="Product" Type="Self.Product" Multiplicity="1" />
|
|
|
+ <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Product">
|
|
|
+ <PropertyRef Name="ID" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="ProductSale">
|
|
|
+ <PropertyRef Name="ProductID" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="MaterialSupplier">
|
|
|
+ <End Role="Material" Type="Self.Material" Multiplicity="*" />
|
|
|
+ <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
|
|
|
+ </Association>
|
|
|
+ <EntityContainer Name="user1Entities3" annotation:LazyLoadingEnabled="true">
|
|
|
+ <EntitySet Name="Agent" EntityType="Self.Agent" />
|
|
|
+ <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" />
|
|
|
+ <EntitySet Name="AgentType" EntityType="Self.AgentType" />
|
|
|
+ <EntitySet Name="Material" EntityType="Self.Material" />
|
|
|
+ <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" />
|
|
|
+ <EntitySet Name="MaterialType" EntityType="Self.MaterialType" />
|
|
|
+ <EntitySet Name="Product" EntityType="Self.Product" />
|
|
|
+ <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" />
|
|
|
+ <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" />
|
|
|
+ <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
|
|
|
+ <EntitySet Name="ProductType" EntityType="Self.ProductType" />
|
|
|
+ <EntitySet Name="Shop" EntityType="Self.Shop" />
|
|
|
+ <EntitySet Name="Supplier" EntityType="Self.Supplier" />
|
|
|
+ <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
|
|
|
+ <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
|
|
|
+ <End Role="AgentType" EntitySet="AgentType" />
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="ProductSale" EntitySet="ProductSale" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
|
|
|
+ <End Role="Agent" EntitySet="Agent" />
|
|
|
+ <End Role="Shop" EntitySet="Shop" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
|
|
|
+ <End Role="MaterialType" EntitySet="MaterialType" />
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="ProductMaterial" EntitySet="ProductMaterial" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
|
|
|
+ <End Role="ProductType" EntitySet="ProductType" />
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductMaterial" EntitySet="ProductMaterial" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
|
|
|
+ <End Role="Product" EntitySet="Product" />
|
|
|
+ <End Role="ProductSale" EntitySet="ProductSale" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="MaterialSupplier" Association="Self.MaterialSupplier">
|
|
|
+ <End Role="Material" EntitySet="Material" />
|
|
|
+ <End Role="Supplier" EntitySet="Supplier" />
|
|
|
+ </AssociationSet>
|
|
|
+ </EntityContainer>
|
|
|
+ </Schema>
|
|
|
+ </edmx:ConceptualModels>
|
|
|
+ <!-- C-S mapping content -->
|
|
|
+ <edmx:Mappings>
|
|
|
+ <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
|
|
|
+ <EntityContainerMapping StorageEntityContainer="Хранилище user1ModelContainer" CdmEntityContainer="user1Entities3">
|
|
|
+ <EntitySetMapping Name="Agent">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.Agent">
|
|
|
+ <MappingFragment StoreEntitySet="Agent">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
|
|
|
+ <ScalarProperty Name="Address" ColumnName="Address" />
|
|
|
+ <ScalarProperty Name="INN" ColumnName="INN" />
|
|
|
+ <ScalarProperty Name="KPP" ColumnName="KPP" />
|
|
|
+ <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
|
|
|
+ <ScalarProperty Name="Phone" ColumnName="Phone" />
|
|
|
+ <ScalarProperty Name="Email" ColumnName="Email" />
|
|
|
+ <ScalarProperty Name="Logo" ColumnName="Logo" />
|
|
|
+ <ScalarProperty Name="Priority" ColumnName="Priority" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="AgentPriorityHistory">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.AgentPriorityHistory">
|
|
|
+ <MappingFragment StoreEntitySet="AgentPriorityHistory">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="AgentID" ColumnName="AgentID" />
|
|
|
+ <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
|
|
|
+ <ScalarProperty Name="PriorityValue" ColumnName="PriorityValue" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="AgentType">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.AgentType">
|
|
|
+ <MappingFragment StoreEntitySet="AgentType">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="Image" ColumnName="Image" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Material">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.Material">
|
|
|
+ <MappingFragment StoreEntitySet="Material">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
|
|
|
+ <ScalarProperty Name="Unit" ColumnName="Unit" />
|
|
|
+ <ScalarProperty Name="CountInStock" ColumnName="CountInStock" />
|
|
|
+ <ScalarProperty Name="MinCount" ColumnName="MinCount" />
|
|
|
+ <ScalarProperty Name="Description" ColumnName="Description" />
|
|
|
+ <ScalarProperty Name="Cost" ColumnName="Cost" />
|
|
|
+ <ScalarProperty Name="Image" ColumnName="Image" />
|
|
|
+ <ScalarProperty Name="MaterialTypeID" ColumnName="MaterialTypeID" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="MaterialCountHistory">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.MaterialCountHistory">
|
|
|
+ <MappingFragment StoreEntitySet="MaterialCountHistory">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
|
|
|
+ <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
|
|
|
+ <ScalarProperty Name="CountValue" ColumnName="CountValue" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="MaterialType">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.MaterialType">
|
|
|
+ <MappingFragment StoreEntitySet="MaterialType">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Product">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.Product">
|
|
|
+ <MappingFragment StoreEntitySet="Product">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
|
|
|
+ <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
|
|
|
+ <ScalarProperty Name="Description" ColumnName="Description" />
|
|
|
+ <ScalarProperty Name="Image" ColumnName="Image" />
|
|
|
+ <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
|
|
|
+ <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
|
|
|
+ <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="ProductCostHistory">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.ProductCostHistory">
|
|
|
+ <MappingFragment StoreEntitySet="ProductCostHistory">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="ProductID" ColumnName="ProductID" />
|
|
|
+ <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
|
|
|
+ <ScalarProperty Name="CostValue" ColumnName="CostValue" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="ProductMaterial">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.ProductMaterial">
|
|
|
+ <MappingFragment StoreEntitySet="ProductMaterial">
|
|
|
+ <ScalarProperty Name="ProductID" ColumnName="ProductID" />
|
|
|
+ <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
|
|
|
+ <ScalarProperty Name="Count" ColumnName="Count" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="ProductSale">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.ProductSale">
|
|
|
+ <MappingFragment StoreEntitySet="ProductSale">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="AgentID" ColumnName="AgentID" />
|
|
|
+ <ScalarProperty Name="ProductID" ColumnName="ProductID" />
|
|
|
+ <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
|
|
|
+ <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="ProductType">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.ProductType">
|
|
|
+ <MappingFragment StoreEntitySet="ProductType">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Shop">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.Shop">
|
|
|
+ <MappingFragment StoreEntitySet="Shop">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="Address" ColumnName="Address" />
|
|
|
+ <ScalarProperty Name="AgentID" ColumnName="AgentID" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Supplier">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.Supplier">
|
|
|
+ <MappingFragment StoreEntitySet="Supplier">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="ID" />
|
|
|
+ <ScalarProperty Name="Title" ColumnName="Title" />
|
|
|
+ <ScalarProperty Name="INN" ColumnName="INN" />
|
|
|
+ <ScalarProperty Name="StartDate" ColumnName="StartDate" />
|
|
|
+ <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
|
|
|
+ <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="sysdiagrams">
|
|
|
+ <EntityTypeMapping TypeName="user1Model.sysdiagrams">
|
|
|
+ <MappingFragment StoreEntitySet="sysdiagrams">
|
|
|
+ <ScalarProperty Name="name" ColumnName="name" />
|
|
|
+ <ScalarProperty Name="principal_id" ColumnName="principal_id" />
|
|
|
+ <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
|
|
|
+ <ScalarProperty Name="version" ColumnName="version" />
|
|
|
+ <ScalarProperty Name="definition" ColumnName="definition" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <AssociationSetMapping Name="MaterialSupplier" TypeName="user1Model.MaterialSupplier" StoreEntitySet="MaterialSupplier">
|
|
|
+ <EndProperty Name="Material">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="MaterialID" />
|
|
|
+ </EndProperty>
|
|
|
+ <EndProperty Name="Supplier">
|
|
|
+ <ScalarProperty Name="ID" ColumnName="SupplierID" />
|
|
|
+ </EndProperty>
|
|
|
+ </AssociationSetMapping>
|
|
|
+ </EntityContainerMapping>
|
|
|
+ </Mapping>
|
|
|
+ </edmx:Mappings>
|
|
|
+ </edmx:Runtime>
|
|
|
+ <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
|
|
+ <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
|
|
+ <Connection>
|
|
|
+ <DesignerInfoPropertySet>
|
|
|
+ <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
|
|
|
+ </DesignerInfoPropertySet>
|
|
|
+ </Connection>
|
|
|
+ <Options>
|
|
|
+ <DesignerInfoPropertySet>
|
|
|
+ <DesignerProperty Name="ValidateOnBuild" Value="true" />
|
|
|
+ <DesignerProperty Name="EnablePluralization" Value="false" />
|
|
|
+ <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
|
|
|
+ <DesignerProperty Name="UseLegacyProvider" Value="false" />
|
|
|
+ <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
|
|
|
+ </DesignerInfoPropertySet>
|
|
|
+ </Options>
|
|
|
+ <!-- Diagram content (shape and connector positions) -->
|
|
|
+ <Diagrams></Diagrams>
|
|
|
+ </Designer>
|
|
|
+</edmx:Edmx>
|