|
@@ -0,0 +1,531 @@
|
|
|
+<?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="Хранилище PsychoTestsModel" 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="Answers">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Answer_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Answer_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Answer_name" Type="varchar(max)" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Categories">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Category_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Category_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Category_name" Type="varchar(max)" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Questions">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Question_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Question_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Content" Type="varchar(max)" />
|
|
|
+ <Property Name="Id_test" Type="int" />
|
|
|
+ <Property Name="Id_answer" Type="int" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Results">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Result_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Result_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Result_name" Type="varchar(max)" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="varchar(max)" />
|
|
|
+ <Property Name="Id_test" Type="int" />
|
|
|
+ <Property Name="Score_count" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Roles">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Role_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Role_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Role_name" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Tests">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Test_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Test_name" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Questions_count" Type="int" />
|
|
|
+ <Property Name="Description" Type="varchar(max)" />
|
|
|
+ <Property Name="Image" Type="varbinary(max)" />
|
|
|
+ <Property Name="Id_category" Type="int" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Users">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="User_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="User_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Login" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Password" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Id_role" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Surname" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Name" Type="varchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Patronymic" Type="varchar" MaxLength="50" />
|
|
|
+ <Property Name="Id_doctor" Type="int" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Users_Tests">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="Id_user" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Id_result" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <Association Name="FK_Questions_Answers">
|
|
|
+ <End Role="Answers" Type="Self.Answers" Multiplicity="0..1" />
|
|
|
+ <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Answers">
|
|
|
+ <PropertyRef Name="Answer_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Questions">
|
|
|
+ <PropertyRef Name="Id_answer" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Questions_Tests">
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
|
|
|
+ <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Tests">
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Questions">
|
|
|
+ <PropertyRef Name="Id_test" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Results_Tests">
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
|
|
|
+ <End Role="Results" Type="Self.Results" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Tests">
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Results">
|
|
|
+ <PropertyRef Name="Id_test" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Tests_Categories">
|
|
|
+ <End Role="Categories" Type="Self.Categories" Multiplicity="0..1" />
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Categories">
|
|
|
+ <PropertyRef Name="Category_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Tests">
|
|
|
+ <PropertyRef Name="Id_category" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Users_Roles">
|
|
|
+ <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
|
|
|
+ <End Role="Users" Type="Self.Users" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Roles">
|
|
|
+ <PropertyRef Name="Role_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users">
|
|
|
+ <PropertyRef Name="Id_role" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Users_Tests_Results">
|
|
|
+ <End Role="Results" Type="Self.Results" Multiplicity="1">
|
|
|
+ <OnDelete Action="Cascade" />
|
|
|
+ </End>
|
|
|
+ <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Results">
|
|
|
+ <PropertyRef Name="Result_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users_Tests">
|
|
|
+ <PropertyRef Name="Id_result" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Users_Tests_Users">
|
|
|
+ <End Role="Users" Type="Self.Users" Multiplicity="1">
|
|
|
+ <OnDelete Action="Cascade" />
|
|
|
+ </End>
|
|
|
+ <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Users">
|
|
|
+ <PropertyRef Name="User_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users_Tests">
|
|
|
+ <PropertyRef Name="Id_user" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <EntityContainer Name="Хранилище PsychoTestsModelContainer">
|
|
|
+ <EntitySet Name="Answers" EntityType="Self.Answers" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Categories" EntityType="Self.Categories" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Questions" EntityType="Self.Questions" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Results" EntityType="Self.Results" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Roles" EntityType="Self.Roles" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Tests" EntityType="Self.Tests" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Users_Tests" EntityType="Self.Users_Tests" Schema="dbo" store:Type="Tables" />
|
|
|
+ <AssociationSet Name="FK_Questions_Answers" Association="Self.FK_Questions_Answers">
|
|
|
+ <End Role="Answers" EntitySet="Answers" />
|
|
|
+ <End Role="Questions" EntitySet="Questions" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ <End Role="Questions" EntitySet="Questions" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Results_Tests" Association="Self.FK_Results_Tests">
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ <End Role="Results" EntitySet="Results" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Tests_Categories" Association="Self.FK_Tests_Categories">
|
|
|
+ <End Role="Categories" EntitySet="Categories" />
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
|
|
|
+ <End Role="Roles" EntitySet="Roles" />
|
|
|
+ <End Role="Users" EntitySet="Users" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Tests_Results" Association="Self.FK_Users_Tests_Results">
|
|
|
+ <End Role="Results" EntitySet="Results" />
|
|
|
+ <End Role="Users_Tests" EntitySet="Users_Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Tests_Users" Association="Self.FK_Users_Tests_Users">
|
|
|
+ <End Role="Users" EntitySet="Users" />
|
|
|
+ <End Role="Users_Tests" EntitySet="Users_Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ </EntityContainer>
|
|
|
+ </Schema></edmx:StorageModels>
|
|
|
+ <!-- CSDL content -->
|
|
|
+ <edmx:ConceptualModels>
|
|
|
+ <Schema Namespace="PsychoTestsModel" 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="Answers">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Answer_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Answer_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Answer_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Questions" Relationship="Self.FK_Questions_Answers" FromRole="Answers" ToRole="Questions" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Categories">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Category_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Category_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Category_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Tests" Relationship="Self.FK_Tests_Categories" FromRole="Categories" ToRole="Tests" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Questions">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Question_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Question_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Content" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
|
|
+ <Property Name="Id_test" Type="Int32" />
|
|
|
+ <Property Name="Id_answer" Type="Int32" />
|
|
|
+ <NavigationProperty Name="Answers" Relationship="Self.FK_Questions_Answers" FromRole="Questions" ToRole="Answers" />
|
|
|
+ <NavigationProperty Name="Tests" Relationship="Self.FK_Questions_Tests" FromRole="Questions" ToRole="Tests" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Results">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Result_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Result_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Result_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
|
|
+ <Property Name="Id_test" Type="Int32" />
|
|
|
+ <Property Name="Score_count" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Tests" Relationship="Self.FK_Results_Tests" FromRole="Results" ToRole="Tests" />
|
|
|
+ <NavigationProperty Name="Users_Tests" Relationship="PsychoTestsModel.FK_Users_Tests_Results" FromRole="Results" ToRole="Users_Tests" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Roles">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Role_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Role_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Role_name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Users" Relationship="Self.FK_Users_Roles" FromRole="Roles" ToRole="Users" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Tests">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Test_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Test_name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Questions_count" Type="Int32" />
|
|
|
+ <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
|
|
|
+ <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
|
|
|
+ <Property Name="Id_category" Type="Int32" />
|
|
|
+ <NavigationProperty Name="Categories" Relationship="Self.FK_Tests_Categories" FromRole="Tests" ToRole="Categories" />
|
|
|
+ <NavigationProperty Name="Questions" Relationship="Self.FK_Questions_Tests" FromRole="Tests" ToRole="Questions" />
|
|
|
+ <NavigationProperty Name="Results" Relationship="Self.FK_Results_Tests" FromRole="Tests" ToRole="Results" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Users">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="User_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="User_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Id_role" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Surname" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
|
|
|
+ <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
|
|
+ <Property Name="Id_doctor" Type="Int32" />
|
|
|
+ <NavigationProperty Name="Roles" Relationship="Self.FK_Users_Roles" FromRole="Users" ToRole="Roles" />
|
|
|
+ <NavigationProperty Name="Users_Tests" Relationship="Self.FK_Users_Tests_Users" FromRole="Users" ToRole="Users_Tests" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Users_Tests">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="Id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="Id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Id_user" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Users" Relationship="Self.FK_Users_Tests_Users" FromRole="Users_Tests" ToRole="Users" />
|
|
|
+ <Property Name="Id_result" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Results" Relationship="PsychoTestsModel.FK_Users_Tests_Results" FromRole="Users_Tests" ToRole="Results" />
|
|
|
+ </EntityType>
|
|
|
+ <Association Name="FK_Questions_Answers">
|
|
|
+ <End Role="Answers" Type="Self.Answers" Multiplicity="0..1" />
|
|
|
+ <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Answers">
|
|
|
+ <PropertyRef Name="Answer_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Questions">
|
|
|
+ <PropertyRef Name="Id_answer" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Tests_Categories">
|
|
|
+ <End Role="Categories" Type="Self.Categories" Multiplicity="0..1" />
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Categories">
|
|
|
+ <PropertyRef Name="Category_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Tests">
|
|
|
+ <PropertyRef Name="Id_category" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Questions_Tests">
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
|
|
|
+ <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Tests">
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Questions">
|
|
|
+ <PropertyRef Name="Id_test" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Results_Tests">
|
|
|
+ <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
|
|
|
+ <End Role="Results" Type="Self.Results" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Tests">
|
|
|
+ <PropertyRef Name="Test_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Results">
|
|
|
+ <PropertyRef Name="Id_test" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Users_Roles">
|
|
|
+ <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
|
|
|
+ <End Role="Users" Type="Self.Users" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Roles">
|
|
|
+ <PropertyRef Name="Role_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users">
|
|
|
+ <PropertyRef Name="Id_role" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Users_Tests_Users">
|
|
|
+ <End Role="Users" Type="Self.Users" Multiplicity="1">
|
|
|
+ <OnDelete Action="Cascade" />
|
|
|
+ </End>
|
|
|
+ <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Users">
|
|
|
+ <PropertyRef Name="User_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users_Tests">
|
|
|
+ <PropertyRef Name="Id_user" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <EntityContainer Name="PsychoBase" annotation:LazyLoadingEnabled="true">
|
|
|
+ <EntitySet Name="Answers" EntityType="Self.Answers" />
|
|
|
+ <EntitySet Name="Categories" EntityType="Self.Categories" />
|
|
|
+ <EntitySet Name="Questions" EntityType="Self.Questions" />
|
|
|
+ <EntitySet Name="Results" EntityType="Self.Results" />
|
|
|
+ <EntitySet Name="Roles" EntityType="Self.Roles" />
|
|
|
+ <EntitySet Name="Tests" EntityType="Self.Tests" />
|
|
|
+ <EntitySet Name="Users" EntityType="Self.Users" />
|
|
|
+ <EntitySet Name="Users_Tests" EntityType="Self.Users_Tests" />
|
|
|
+ <AssociationSet Name="FK_Questions_Answers" Association="Self.FK_Questions_Answers">
|
|
|
+ <End Role="Answers" EntitySet="Answers" />
|
|
|
+ <End Role="Questions" EntitySet="Questions" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Tests_Categories" Association="Self.FK_Tests_Categories">
|
|
|
+ <End Role="Categories" EntitySet="Categories" />
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ <End Role="Questions" EntitySet="Questions" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Results_Tests" Association="Self.FK_Results_Tests">
|
|
|
+ <End Role="Tests" EntitySet="Tests" />
|
|
|
+ <End Role="Results" EntitySet="Results" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
|
|
|
+ <End Role="Roles" EntitySet="Roles" />
|
|
|
+ <End Role="Users" EntitySet="Users" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Tests_Users" Association="Self.FK_Users_Tests_Users">
|
|
|
+ <End Role="Users" EntitySet="Users" />
|
|
|
+ <End Role="Users_Tests" EntitySet="Users_Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Users_Tests_Results" Association="PsychoTestsModel.FK_Users_Tests_Results">
|
|
|
+ <End Role="Results" EntitySet="Results" />
|
|
|
+ <End Role="Users_Tests" EntitySet="Users_Tests" />
|
|
|
+ </AssociationSet>
|
|
|
+ </EntityContainer>
|
|
|
+ <Association Name="FK_Users_Tests_Results">
|
|
|
+ <End Type="PsychoTestsModel.Results" Role="Results" Multiplicity="1">
|
|
|
+ <OnDelete Action="Cascade" />
|
|
|
+ </End>
|
|
|
+ <End Type="PsychoTestsModel.Users_Tests" Role="Users_Tests" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Results">
|
|
|
+ <PropertyRef Name="Result_id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Users_Tests">
|
|
|
+ <PropertyRef Name="Id_result" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ </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="Хранилище PsychoTestsModelContainer" CdmEntityContainer="PsychoBase">
|
|
|
+ <EntitySetMapping Name="Answers">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Answers">
|
|
|
+ <MappingFragment StoreEntitySet="Answers">
|
|
|
+ <ScalarProperty Name="Answer_id" ColumnName="Answer_id" />
|
|
|
+ <ScalarProperty Name="Answer_name" ColumnName="Answer_name" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Categories">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Categories">
|
|
|
+ <MappingFragment StoreEntitySet="Categories">
|
|
|
+ <ScalarProperty Name="Category_id" ColumnName="Category_id" />
|
|
|
+ <ScalarProperty Name="Category_name" ColumnName="Category_name" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Questions">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Questions">
|
|
|
+ <MappingFragment StoreEntitySet="Questions">
|
|
|
+ <ScalarProperty Name="Question_id" ColumnName="Question_id" />
|
|
|
+ <ScalarProperty Name="Content" ColumnName="Content" />
|
|
|
+ <ScalarProperty Name="Id_test" ColumnName="Id_test" />
|
|
|
+ <ScalarProperty Name="Id_answer" ColumnName="Id_answer" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Results">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Results">
|
|
|
+ <MappingFragment StoreEntitySet="Results">
|
|
|
+ <ScalarProperty Name="Result_id" ColumnName="Result_id" />
|
|
|
+ <ScalarProperty Name="Result_name" ColumnName="Result_name" />
|
|
|
+ <ScalarProperty Name="Description" ColumnName="Description" />
|
|
|
+ <ScalarProperty Name="Id_test" ColumnName="Id_test" />
|
|
|
+ <ScalarProperty Name="Score_count" ColumnName="Score_count" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Roles">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Roles">
|
|
|
+ <MappingFragment StoreEntitySet="Roles">
|
|
|
+ <ScalarProperty Name="Role_id" ColumnName="Role_id" />
|
|
|
+ <ScalarProperty Name="Role_name" ColumnName="Role_name" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Tests">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Tests">
|
|
|
+ <MappingFragment StoreEntitySet="Tests">
|
|
|
+ <ScalarProperty Name="Test_id" ColumnName="Test_id" />
|
|
|
+ <ScalarProperty Name="Test_name" ColumnName="Test_name" />
|
|
|
+ <ScalarProperty Name="Questions_count" ColumnName="Questions_count" />
|
|
|
+ <ScalarProperty Name="Description" ColumnName="Description" />
|
|
|
+ <ScalarProperty Name="Image" ColumnName="Image" />
|
|
|
+ <ScalarProperty Name="Id_category" ColumnName="Id_category" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Users">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Users">
|
|
|
+ <MappingFragment StoreEntitySet="Users">
|
|
|
+ <ScalarProperty Name="User_id" ColumnName="User_id" />
|
|
|
+ <ScalarProperty Name="Login" ColumnName="Login" />
|
|
|
+ <ScalarProperty Name="Password" ColumnName="Password" />
|
|
|
+ <ScalarProperty Name="Id_role" ColumnName="Id_role" />
|
|
|
+ <ScalarProperty Name="Surname" ColumnName="Surname" />
|
|
|
+ <ScalarProperty Name="Name" ColumnName="Name" />
|
|
|
+ <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
|
|
|
+ <ScalarProperty Name="Id_doctor" ColumnName="Id_doctor" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Users_Tests">
|
|
|
+ <EntityTypeMapping TypeName="PsychoTestsModel.Users_Tests">
|
|
|
+ <MappingFragment StoreEntitySet="Users_Tests">
|
|
|
+ <ScalarProperty Name="Id_result" ColumnName="Id_result" />
|
|
|
+ <ScalarProperty Name="Id" ColumnName="Id" />
|
|
|
+ <ScalarProperty Name="Id_user" ColumnName="Id_user" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ </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>
|