Model1.edmx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  3. <!-- EF Runtime content -->
  4. <edmx:Runtime>
  5. <!-- SSDL content -->
  6. <edmx:StorageModels>
  7. <Schema Namespace="Хранилище user33Model" 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">
  8. <EntityType Name="Agent">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  14. <Property Name="AgentTypeID" Type="int" Nullable="false" />
  15. <Property Name="Address" Type="nvarchar" MaxLength="300" />
  16. <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
  17. <Property Name="KPP" Type="varchar" MaxLength="9" />
  18. <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
  19. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  20. <Property Name="Email" Type="nvarchar" MaxLength="255" />
  21. <Property Name="Logo" Type="nvarchar" MaxLength="100" />
  22. <Property Name="Priority" Type="int" Nullable="false" />
  23. </EntityType>
  24. <EntityType Name="AgentType">
  25. <Key>
  26. <PropertyRef Name="ID" />
  27. </Key>
  28. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  29. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  30. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  31. </EntityType>
  32. <EntityType Name="Product">
  33. <Key>
  34. <PropertyRef Name="ID" />
  35. </Key>
  36. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  37. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  38. <Property Name="ProductTypeID" Type="int" />
  39. <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
  40. <Property Name="Description" Type="nvarchar(max)" />
  41. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  42. <Property Name="ProductionPersonCount" Type="int" />
  43. <Property Name="ProductionWorkshopNumber" Type="int" />
  44. <Property Name="MinCostForAgent" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  45. </EntityType>
  46. <EntityType Name="ProductSale">
  47. <Key>
  48. <PropertyRef Name="ID" />
  49. </Key>
  50. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  51. <Property Name="AgentID" Type="int" Nullable="false" />
  52. <Property Name="ProductID" Type="int" Nullable="false" />
  53. <Property Name="SaleDate" Type="date" Nullable="false" />
  54. <Property Name="ProductCount" Type="int" Nullable="false" />
  55. </EntityType>
  56. <EntityType Name="ProductType">
  57. <Key>
  58. <PropertyRef Name="ID" />
  59. </Key>
  60. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  61. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  62. <Property Name="DefectedPercent" Type="float" Nullable="false" />
  63. </EntityType>
  64. <Association Name="FK_Agent_AgentType">
  65. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  66. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  67. <ReferentialConstraint>
  68. <Principal Role="AgentType">
  69. <PropertyRef Name="ID" />
  70. </Principal>
  71. <Dependent Role="Agent">
  72. <PropertyRef Name="AgentTypeID" />
  73. </Dependent>
  74. </ReferentialConstraint>
  75. </Association>
  76. <Association Name="FK_Product_ProductType">
  77. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  78. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  79. <ReferentialConstraint>
  80. <Principal Role="ProductType">
  81. <PropertyRef Name="ID" />
  82. </Principal>
  83. <Dependent Role="Product">
  84. <PropertyRef Name="ProductTypeID" />
  85. </Dependent>
  86. </ReferentialConstraint>
  87. </Association>
  88. <Association Name="FK_ProductSale_Agent">
  89. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  90. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  91. <ReferentialConstraint>
  92. <Principal Role="Agent">
  93. <PropertyRef Name="ID" />
  94. </Principal>
  95. <Dependent Role="ProductSale">
  96. <PropertyRef Name="AgentID" />
  97. </Dependent>
  98. </ReferentialConstraint>
  99. </Association>
  100. <Association Name="FK_ProductSale_Product">
  101. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  102. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  103. <ReferentialConstraint>
  104. <Principal Role="Product">
  105. <PropertyRef Name="ID" />
  106. </Principal>
  107. <Dependent Role="ProductSale">
  108. <PropertyRef Name="ProductID" />
  109. </Dependent>
  110. </ReferentialConstraint>
  111. </Association>
  112. <EntityContainer Name="Хранилище user33ModelContainer">
  113. <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
  114. <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
  115. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  116. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
  117. <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
  118. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  119. <End Role="AgentType" EntitySet="AgentType" />
  120. <End Role="Agent" EntitySet="Agent" />
  121. </AssociationSet>
  122. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  123. <End Role="ProductType" EntitySet="ProductType" />
  124. <End Role="Product" EntitySet="Product" />
  125. </AssociationSet>
  126. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  127. <End Role="Agent" EntitySet="Agent" />
  128. <End Role="ProductSale" EntitySet="ProductSale" />
  129. </AssociationSet>
  130. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  131. <End Role="Product" EntitySet="Product" />
  132. <End Role="ProductSale" EntitySet="ProductSale" />
  133. </AssociationSet>
  134. </EntityContainer>
  135. </Schema>
  136. </edmx:StorageModels>
  137. <!-- CSDL content -->
  138. <edmx:ConceptualModels>
  139. <Schema Namespace="user33Model" 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">
  140. <EntityType Name="Agent">
  141. <Key>
  142. <PropertyRef Name="ID" />
  143. </Key>
  144. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  145. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  146. <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
  147. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  148. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  149. <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
  150. <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  151. <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  152. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  153. <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  154. <Property Name="Priority" Type="Int32" Nullable="false" />
  155. <NavigationProperty Name="AgentType" Relationship="Self.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
  156. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
  157. </EntityType>
  158. <EntityType Name="AgentType">
  159. <Key>
  160. <PropertyRef Name="ID" />
  161. </Key>
  162. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  163. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  164. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  165. <NavigationProperty Name="Agent" Relationship="Self.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
  166. </EntityType>
  167. <EntityType Name="Product">
  168. <Key>
  169. <PropertyRef Name="ID" />
  170. </Key>
  171. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  172. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  173. <Property Name="ProductTypeID" Type="Int32" />
  174. <Property Name="ArticleNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  175. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  176. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  177. <Property Name="ProductionPersonCount" Type="Int32" />
  178. <Property Name="ProductionWorkshopNumber" Type="Int32" />
  179. <Property Name="MinCostForAgent" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  180. <NavigationProperty Name="ProductType" Relationship="Self.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
  181. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  182. </EntityType>
  183. <EntityType Name="ProductSale">
  184. <Key>
  185. <PropertyRef Name="ID" />
  186. </Key>
  187. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  188. <Property Name="AgentID" Type="Int32" Nullable="false" />
  189. <Property Name="ProductID" Type="Int32" Nullable="false" />
  190. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
  191. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  192. <NavigationProperty Name="Agent" Relationship="Self.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
  193. <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  194. </EntityType>
  195. <EntityType Name="ProductType">
  196. <Key>
  197. <PropertyRef Name="ID" />
  198. </Key>
  199. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  200. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  201. <Property Name="DefectedPercent" Type="Double" Nullable="false" />
  202. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
  203. </EntityType>
  204. <Association Name="FK_Agent_AgentType">
  205. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  206. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  207. <ReferentialConstraint>
  208. <Principal Role="AgentType">
  209. <PropertyRef Name="ID" />
  210. </Principal>
  211. <Dependent Role="Agent">
  212. <PropertyRef Name="AgentTypeID" />
  213. </Dependent>
  214. </ReferentialConstraint>
  215. </Association>
  216. <Association Name="FK_ProductSale_Agent">
  217. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  218. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  219. <ReferentialConstraint>
  220. <Principal Role="Agent">
  221. <PropertyRef Name="ID" />
  222. </Principal>
  223. <Dependent Role="ProductSale">
  224. <PropertyRef Name="AgentID" />
  225. </Dependent>
  226. </ReferentialConstraint>
  227. </Association>
  228. <Association Name="FK_Product_ProductType">
  229. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  230. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  231. <ReferentialConstraint>
  232. <Principal Role="ProductType">
  233. <PropertyRef Name="ID" />
  234. </Principal>
  235. <Dependent Role="Product">
  236. <PropertyRef Name="ProductTypeID" />
  237. </Dependent>
  238. </ReferentialConstraint>
  239. </Association>
  240. <Association Name="FK_ProductSale_Product">
  241. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  242. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  243. <ReferentialConstraint>
  244. <Principal Role="Product">
  245. <PropertyRef Name="ID" />
  246. </Principal>
  247. <Dependent Role="ProductSale">
  248. <PropertyRef Name="ProductID" />
  249. </Dependent>
  250. </ReferentialConstraint>
  251. </Association>
  252. <EntityContainer Name="user33Entities1" annotation:LazyLoadingEnabled="true">
  253. <EntitySet Name="Agent" EntityType="Self.Agent" />
  254. <EntitySet Name="AgentType" EntityType="Self.AgentType" />
  255. <EntitySet Name="Product" EntityType="Self.Product" />
  256. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  257. <EntitySet Name="ProductType" EntityType="Self.ProductType" />
  258. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  259. <End Role="AgentType" EntitySet="AgentType" />
  260. <End Role="Agent" EntitySet="Agent" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  263. <End Role="Agent" EntitySet="Agent" />
  264. <End Role="ProductSale" EntitySet="ProductSale" />
  265. </AssociationSet>
  266. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  267. <End Role="ProductType" EntitySet="ProductType" />
  268. <End Role="Product" EntitySet="Product" />
  269. </AssociationSet>
  270. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  271. <End Role="Product" EntitySet="Product" />
  272. <End Role="ProductSale" EntitySet="ProductSale" />
  273. </AssociationSet>
  274. </EntityContainer>
  275. </Schema>
  276. </edmx:ConceptualModels>
  277. <!-- C-S mapping content -->
  278. <edmx:Mappings>
  279. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  280. <EntityContainerMapping StorageEntityContainer="Хранилище user33ModelContainer" CdmEntityContainer="user33Entities1">
  281. <EntitySetMapping Name="Agent">
  282. <EntityTypeMapping TypeName="user33Model.Agent">
  283. <MappingFragment StoreEntitySet="Agent">
  284. <ScalarProperty Name="ID" ColumnName="ID" />
  285. <ScalarProperty Name="Title" ColumnName="Title" />
  286. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  287. <ScalarProperty Name="Address" ColumnName="Address" />
  288. <ScalarProperty Name="INN" ColumnName="INN" />
  289. <ScalarProperty Name="KPP" ColumnName="KPP" />
  290. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  291. <ScalarProperty Name="Phone" ColumnName="Phone" />
  292. <ScalarProperty Name="Email" ColumnName="Email" />
  293. <ScalarProperty Name="Logo" ColumnName="Logo" />
  294. <ScalarProperty Name="Priority" ColumnName="Priority" />
  295. </MappingFragment>
  296. </EntityTypeMapping>
  297. </EntitySetMapping>
  298. <EntitySetMapping Name="AgentType">
  299. <EntityTypeMapping TypeName="user33Model.AgentType">
  300. <MappingFragment StoreEntitySet="AgentType">
  301. <ScalarProperty Name="ID" ColumnName="ID" />
  302. <ScalarProperty Name="Title" ColumnName="Title" />
  303. <ScalarProperty Name="Image" ColumnName="Image" />
  304. </MappingFragment>
  305. </EntityTypeMapping>
  306. </EntitySetMapping>
  307. <EntitySetMapping Name="Product">
  308. <EntityTypeMapping TypeName="user33Model.Product">
  309. <MappingFragment StoreEntitySet="Product">
  310. <ScalarProperty Name="ID" ColumnName="ID" />
  311. <ScalarProperty Name="Title" ColumnName="Title" />
  312. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  313. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  314. <ScalarProperty Name="Description" ColumnName="Description" />
  315. <ScalarProperty Name="Image" ColumnName="Image" />
  316. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  317. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  318. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  319. </MappingFragment>
  320. </EntityTypeMapping>
  321. </EntitySetMapping>
  322. <EntitySetMapping Name="ProductSale">
  323. <EntityTypeMapping TypeName="user33Model.ProductSale">
  324. <MappingFragment StoreEntitySet="ProductSale">
  325. <ScalarProperty Name="ID" ColumnName="ID" />
  326. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  327. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  328. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  329. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  330. </MappingFragment>
  331. </EntityTypeMapping>
  332. </EntitySetMapping>
  333. <EntitySetMapping Name="ProductType">
  334. <EntityTypeMapping TypeName="user33Model.ProductType">
  335. <MappingFragment StoreEntitySet="ProductType">
  336. <ScalarProperty Name="ID" ColumnName="ID" />
  337. <ScalarProperty Name="Title" ColumnName="Title" />
  338. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  339. </MappingFragment>
  340. </EntityTypeMapping>
  341. </EntitySetMapping>
  342. </EntityContainerMapping>
  343. </Mapping>
  344. </edmx:Mappings>
  345. </edmx:Runtime>
  346. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  347. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  348. <Connection>
  349. <DesignerInfoPropertySet>
  350. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  351. </DesignerInfoPropertySet>
  352. </Connection>
  353. <Options>
  354. <DesignerInfoPropertySet>
  355. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  356. <DesignerProperty Name="EnablePluralization" Value="false" />
  357. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  358. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  359. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  360. </DesignerInfoPropertySet>
  361. </Options>
  362. <!-- Diagram content (shape and connector positions) -->
  363. <Diagrams></Diagrams>
  364. </Designer>
  365. </edmx:Edmx>