#418 IndirectQuotation field
This commit is contained in:
parent
ce8f3f0aaf
commit
2641c4d6f2
5596
RMuseum/Migrations/20231215155352_QPRelatedInDirectly.Designer.cs
generated
Normal file
5596
RMuseum/Migrations/20231215155352_QPRelatedInDirectly.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
RMuseum/Migrations/20231215155352_QPRelatedInDirectly.cs
Normal file
29
RMuseum/Migrations/20231215155352_QPRelatedInDirectly.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RMuseum.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class QPRelatedInDirectly : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IndirectQuotation",
|
||||
table: "GanjoorQuotedPoems",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IndirectQuotation",
|
||||
table: "GanjoorQuotedPoems");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1842,6 +1842,9 @@ namespace RMuseum.Migrations
|
||||
b.Property<bool>("CoupletVerse2ShouldBeEmphasized")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IndirectQuotation")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsPriorToRelated")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
||||
@ -147,5 +147,10 @@ namespace RMuseum.Models.Ganjoor
|
||||
/// related poet id
|
||||
/// </summary>
|
||||
public int? RelatedPoetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// related indirectly
|
||||
/// </summary>
|
||||
public bool IndirectQuotation { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -3683,6 +3683,18 @@
|
||||
<member name="M:RMuseum.Migrations.GanjoorQuotedPoemPoet.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:RMuseum.Migrations.QPRelatedInDirectly">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.QPRelatedInDirectly.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.QPRelatedInDirectly.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.QPRelatedInDirectly.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
|
||||
<summary>
|
||||
donation expenditures
|
||||
@ -8958,6 +8970,11 @@
|
||||
related poet id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.GanjoorQuotedPoem.IndirectQuotation">
|
||||
<summary>
|
||||
related indirectly
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:RMuseum.Models.Ganjoor.GanjoorRelatedPerson">
|
||||
<summary>
|
||||
a person refered by a poem
|
||||
|
||||
@ -175,6 +175,7 @@ namespace RMuseum.Services.Implementation
|
||||
Note = "",
|
||||
Published = true,
|
||||
ClaimedByBothPoets = false,
|
||||
IndirectQuotation = false,
|
||||
SamePoemsQuotedCount = await context.GanjoorQuotedPoems.AsNoTracking().Where(p => p.PoemId == poem1.Id && p.RelatedPoemId == poem2.Id).AnyAsync() ?
|
||||
1 + await context.GanjoorQuotedPoems.AsNoTracking().Where(p => p.PoemId == poem1.Id && p.RelatedPoemId == poem2.Id).CountAsync() : 1
|
||||
};
|
||||
@ -366,6 +367,7 @@ namespace RMuseum.Services.Implementation
|
||||
CoupletVerse2ShouldBeEmphasized = relatedPoem.RelatedCoupletVerse2ShouldBeEmphasized,
|
||||
CoupletIndex = relatedPoem.RelatedCoupletIndex,
|
||||
ClaimedByBothPoets = false,
|
||||
IndirectQuotation = false,
|
||||
SamePoemsQuotedCount = await context.GanjoorQuotedPoems.AsNoTracking().Where(p => p.PoemId == poem2.Id && p.RelatedPoemId == poem1.Id).AnyAsync() ?
|
||||
1 + await context.GanjoorQuotedPoems.AsNoTracking().Where(p => p.PoemId == poem2.Id && p.RelatedPoemId == poem1.Id).CountAsync() : 1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user