ModelViolation.csdl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <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">
  3. <EntityType Name="Role">
  4. <Key>
  5. <PropertyRef Name="RoleID" />
  6. </Key>
  7. <Property Name="RoleID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  8. <Property Name="RoleName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  9. <NavigationProperty Name="User" Relationship="Self.FK_User_Role" FromRole="Role" ToRole="User" />
  10. </EntityType>
  11. <EntityType Name="User">
  12. <Key>
  13. <PropertyRef Name="UserID" />
  14. </Key>
  15. <Property Name="UserID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  16. <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  17. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  18. <Property Name="MiddleName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  19. <Property Name="Phone" Type="String" MaxLength="12" FixedLength="false" Unicode="true" Nullable="false" />
  20. <Property Name="Email" Type="String" MaxLength="200" FixedLength="false" Unicode="true" Nullable="false" />
  21. <Property Name="IDRole" Type="Int32" Nullable="false" />
  22. <NavigationProperty Name="Role" Relationship="Self.FK_User_Role" FromRole="User" ToRole="Role" />
  23. <NavigationProperty Name="Violation" Relationship="Self.FK_Violation_User" FromRole="User" ToRole="Violation" />
  24. <Property Name="Login" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  25. <Property Name="Password" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  26. </EntityType>
  27. <EntityType Name="Violation">
  28. <Key>
  29. <PropertyRef Name="ViolationID" />
  30. </Key>
  31. <Property Name="ViolationID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  32. <Property Name="IDViolationType" Type="Int32" Nullable="false" />
  33. <Property Name="Photo" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
  34. <Property Name="Address" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  35. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  36. <Property Name="IsReviewed" Type="Boolean" />
  37. <Property Name="Comment" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  38. <Property Name="IDUser" Type="Int32" Nullable="false" />
  39. <NavigationProperty Name="User" Relationship="Self.FK_Violation_User" FromRole="Violation" ToRole="User" />
  40. <NavigationProperty Name="ViolationType" Relationship="Self.FK_Violation_ViolationType" FromRole="Violation" ToRole="ViolationType" />
  41. <Property Name="CarNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  42. </EntityType>
  43. <EntityType Name="ViolationType">
  44. <Key>
  45. <PropertyRef Name="ViolationTypeID" />
  46. </Key>
  47. <Property Name="ViolationTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  48. <Property Name="TypeName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  49. <NavigationProperty Name="Violation" Relationship="Self.FK_Violation_ViolationType" FromRole="ViolationType" ToRole="Violation" />
  50. </EntityType>
  51. <Association Name="FK_User_Role">
  52. <End Role="Role" Type="Self.Role" Multiplicity="1" />
  53. <End Role="User" Type="Self.User" Multiplicity="*" />
  54. <ReferentialConstraint>
  55. <Principal Role="Role">
  56. <PropertyRef Name="RoleID" />
  57. </Principal>
  58. <Dependent Role="User">
  59. <PropertyRef Name="IDRole" />
  60. </Dependent>
  61. </ReferentialConstraint>
  62. </Association>
  63. <Association Name="FK_Violation_User">
  64. <End Role="User" Type="Self.User" Multiplicity="1" />
  65. <End Role="Violation" Type="Self.Violation" Multiplicity="*" />
  66. <ReferentialConstraint>
  67. <Principal Role="User">
  68. <PropertyRef Name="UserID" />
  69. </Principal>
  70. <Dependent Role="Violation">
  71. <PropertyRef Name="IDUser" />
  72. </Dependent>
  73. </ReferentialConstraint>
  74. </Association>
  75. <Association Name="FK_Violation_ViolationType">
  76. <End Role="ViolationType" Type="Self.ViolationType" Multiplicity="1" />
  77. <End Role="Violation" Type="Self.Violation" Multiplicity="*" />
  78. <ReferentialConstraint>
  79. <Principal Role="ViolationType">
  80. <PropertyRef Name="ViolationTypeID" />
  81. </Principal>
  82. <Dependent Role="Violation">
  83. <PropertyRef Name="IDViolationType" />
  84. </Dependent>
  85. </ReferentialConstraint>
  86. </Association>
  87. <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
  88. <EntitySet Name="Role" EntityType="Self.Role" />
  89. <EntitySet Name="User" EntityType="Self.User" />
  90. <EntitySet Name="Violation" EntityType="Self.Violation" />
  91. <EntitySet Name="ViolationType" EntityType="Self.ViolationType" />
  92. <AssociationSet Name="FK_User_Role" Association="Self.FK_User_Role">
  93. <End Role="Role" EntitySet="Role" />
  94. <End Role="User" EntitySet="User" />
  95. </AssociationSet>
  96. <AssociationSet Name="FK_Violation_User" Association="Self.FK_Violation_User">
  97. <End Role="User" EntitySet="User" />
  98. <End Role="Violation" EntitySet="Violation" />
  99. </AssociationSet>
  100. <AssociationSet Name="FK_Violation_ViolationType" Association="Self.FK_Violation_ViolationType">
  101. <End Role="ViolationType" EntitySet="ViolationType" />
  102. <End Role="Violation" EntitySet="Violation" />
  103. </AssociationSet>
  104. </EntityContainer>
  105. </Schema>