Skip to content

Commit

Permalink
Merge pull request #7 from Elyas-Amini/develop
Browse files Browse the repository at this point in the history
Update answer and question based on content
  • Loading branch information
Ali-YousefiTelori authored Sep 13, 2023
2 parents 8c6b04e + 3486909 commit 4cc6aa0
Show file tree
Hide file tree
Showing 13 changed files with 437 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,7 @@ public partial class UpdateAnswerRequestContract : System.ComponentModel.INotify
{
private long _id;
private long _questionId;
private System.Collections.Generic.ICollection<LanguageDataContract> _content;
private System.Collections.Generic.ICollection<LanguageDataContract> _contents;
private string _uniqueIdentity;

[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
Expand Down Expand Up @@ -3326,16 +3326,16 @@ public long QuestionId
}
}

[Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<LanguageDataContract> Content
[Newtonsoft.Json.JsonProperty("contents", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<LanguageDataContract> Contents
{
get { return _content; }
get { return _contents; }

set
{
if (_content != value)
if (_contents != value)
{
_content = value;
_contents = value;
RaisePropertyChanged();
}
}
Expand Down Expand Up @@ -3371,7 +3371,6 @@ public partial class UpdateQuestionRequestContract : System.ComponentModel.INoti
{
private long _id;
private System.Collections.Generic.ICollection<LanguageDataContract> _titles;
private string _uniqueIdentity;

[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long Id
Expand Down Expand Up @@ -3403,21 +3402,6 @@ public System.Collections.Generic.ICollection<LanguageDataContract> Titles
}
}

[Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string UniqueIdentity
{
get { return _uniqueIdentity; }

set
{
if (_uniqueIdentity != value)
{
_uniqueIdentity = value;
RaisePropertyChanged();
}
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@
"type": "integer",
"format": "int64"
},
"content": {
"contents": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
Expand Down Expand Up @@ -1449,10 +1449,6 @@
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"uniqueIdentity": {
"type": "string",
"nullable": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,Question,Questions,client</PackageTags>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace EasyMicroservices.QuestionsMicroservice.Migrations
{
/// <inheritdoc />
public partial class Update_Questions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Questions",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
UniqueIdentity = table.Column<string>(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"),
CreationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ModificationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
DeletedDateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Questions", x => x.Id);
});

migrationBuilder.CreateTable(
name: "Answers",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
QuestionId = table.Column<long>(type: "bigint", nullable: false),
Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
UniqueIdentity = table.Column<string>(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
DeletedDateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CreationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ModificationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Answers", x => x.Id);
table.ForeignKey(
name: "FK_Answers_Questions_QuestionId",
column: x => x.QuestionId,
principalTable: "Questions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_Answers_CreationDateTime",
table: "Answers",
column: "CreationDateTime");

migrationBuilder.CreateIndex(
name: "IX_Answers_DeletedDateTime",
table: "Answers",
column: "DeletedDateTime");

migrationBuilder.CreateIndex(
name: "IX_Answers_IsDeleted",
table: "Answers",
column: "IsDeleted");

migrationBuilder.CreateIndex(
name: "IX_Answers_ModificationDateTime",
table: "Answers",
column: "ModificationDateTime");

migrationBuilder.CreateIndex(
name: "IX_Answers_QuestionId",
table: "Answers",
column: "QuestionId");

migrationBuilder.CreateIndex(
name: "IX_Answers_UniqueIdentity",
table: "Answers",
column: "UniqueIdentity");

migrationBuilder.CreateIndex(
name: "IX_Questions_CreationDateTime",
table: "Questions",
column: "CreationDateTime");

migrationBuilder.CreateIndex(
name: "IX_Questions_DeletedDateTime",
table: "Questions",
column: "DeletedDateTime");

migrationBuilder.CreateIndex(
name: "IX_Questions_IsDeleted",
table: "Questions",
column: "IsDeleted");

migrationBuilder.CreateIndex(
name: "IX_Questions_ModificationDateTime",
table: "Questions",
column: "ModificationDateTime");

migrationBuilder.CreateIndex(
name: "IX_Questions_UniqueIdentity",
table: "Questions",
column: "UniqueIdentity");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Answers");

migrationBuilder.DropTable(
name: "Questions");
}
}
}
Loading

0 comments on commit 4cc6aa0

Please sign in to comment.