docs: #275 db migration for suggested photos
This commit is contained in:
parent
4f20219faf
commit
ffb2bcf3e5
3785
RMuseum/Migrations/20220207162117_PoetPhotoDbModel.Designer.cs
generated
Normal file
3785
RMuseum/Migrations/20220207162117_PoetPhotoDbModel.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
68
RMuseum/Migrations/20220207162117_PoetPhotoDbModel.cs
Normal file
68
RMuseum/Migrations/20220207162117_PoetPhotoDbModel.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RMuseum.Migrations
|
||||
{
|
||||
public partial class PoetPhotoDbModel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GanjoorPoetSuggestedPictures",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PoetId = table.Column<int>(type: "int", nullable: false),
|
||||
PicOrder = table.Column<int>(type: "int", nullable: false),
|
||||
PictureId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
SuggestedById = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Published = table.Column<bool>(type: "bit", nullable: false),
|
||||
ChosenOne = table.Column<bool>(type: "bit", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GanjoorPoetSuggestedPictures", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_GanjoorPoetSuggestedPictures_AspNetUsers_SuggestedById",
|
||||
column: x => x.SuggestedById,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_GanjoorPoetSuggestedPictures_GanjoorPoets_PoetId",
|
||||
column: x => x.PoetId,
|
||||
principalTable: "GanjoorPoets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_GanjoorPoetSuggestedPictures_GeneralImages_PictureId",
|
||||
column: x => x.PictureId,
|
||||
principalTable: "GeneralImages",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GanjoorPoetSuggestedPictures_PictureId",
|
||||
table: "GanjoorPoetSuggestedPictures",
|
||||
column: "PictureId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GanjoorPoetSuggestedPictures_PoetId",
|
||||
table: "GanjoorPoetSuggestedPictures",
|
||||
column: "PoetId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GanjoorPoetSuggestedPictures_SuggestedById",
|
||||
table: "GanjoorPoetSuggestedPictures",
|
||||
column: "SuggestedById");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "GanjoorPoetSuggestedPictures");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1177,6 +1177,43 @@ namespace RMuseum.Migrations
|
||||
b.ToTable("GanjoorPoets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoetSuggestedPicture", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<bool>("ChosenOne")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("PicOrder")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("PictureId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("PoetId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Published")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid?>("SuggestedById")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PictureId");
|
||||
|
||||
b.HasIndex("PoetId");
|
||||
|
||||
b.HasIndex("SuggestedById");
|
||||
|
||||
b.ToTable("GanjoorPoetSuggestedPictures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoetSuggestedSpecLine", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -3161,6 +3198,29 @@ namespace RMuseum.Migrations
|
||||
b.Navigation("RImage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoetSuggestedPicture", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.Artifact.RPictureFile", "Picture")
|
||||
.WithMany()
|
||||
.HasForeignKey("PictureId");
|
||||
|
||||
b.HasOne("RMuseum.Models.Ganjoor.GanjoorPoet", "Poet")
|
||||
.WithMany()
|
||||
.HasForeignKey("PoetId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "SuggestedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestedById");
|
||||
|
||||
b.Navigation("Picture");
|
||||
|
||||
b.Navigation("Poet");
|
||||
|
||||
b.Navigation("SuggestedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoetSuggestedSpecLine", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.Ganjoor.GanjoorPoet", "Poet")
|
||||
|
||||
@ -32,12 +32,12 @@ namespace RMuseum.Models.Ganjoor
|
||||
/// <summary>
|
||||
/// picture id
|
||||
/// </summary>
|
||||
public Guid PictureId { get; set; }
|
||||
public Guid? PictureId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// picture
|
||||
/// </summary>
|
||||
public RPictureFile Picture { get; set; }
|
||||
public virtual RPictureFile Picture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// suggested by id
|
||||
|
||||
@ -13118,12 +13118,27 @@
|
||||
<param name="skip"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.PoetPhotoSuggestionService.GetNextUnmoderatedPoetSuggestedSpecLinesCountAsync">
|
||||
<member name="M:RMuseum.Services.Implementation.PoetPhotoSuggestionService.GetNextUnmoderatedPoetSuggestedPhotosCountAsync">
|
||||
<summary>
|
||||
unpublished suggested photos count for poets
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.PoetPhotoSuggestionService.ModifyPoetSuggestedPhotoAsync(RMuseum.Models.Ganjoor.ViewModels.GanjoorPoetSuggestedPictureViewModel)">
|
||||
<summary>
|
||||
modify a suggested photo for poets
|
||||
</summary>
|
||||
<param name="model"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.PoetPhotoSuggestionService.DeletePoetSuggestedPhotoAsync(System.Int32,System.Guid)">
|
||||
<summary>
|
||||
delete a suggested photo for poets
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="deleteUserId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:RMuseum.Services.Implementation.PoetPhotoSuggestionService._context">
|
||||
<summary>
|
||||
Database Context
|
||||
@ -13777,12 +13792,27 @@
|
||||
<param name="skip"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IPoetPhotoSuggestionService.GetNextUnmoderatedPoetSuggestedSpecLinesCountAsync">
|
||||
<member name="M:RMuseum.Services.IPoetPhotoSuggestionService.GetNextUnmoderatedPoetSuggestedPhotosCountAsync">
|
||||
<summary>
|
||||
unpublished suggested photos count for poets
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IPoetPhotoSuggestionService.ModifyPoetSuggestedPhotoAsync(RMuseum.Models.Ganjoor.ViewModels.GanjoorPoetSuggestedPictureViewModel)">
|
||||
<summary>
|
||||
modify a suggested photo for poets
|
||||
</summary>
|
||||
<param name="model"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IPoetPhotoSuggestionService.DeletePoetSuggestedPhotoAsync(System.Int32,System.Guid)">
|
||||
<summary>
|
||||
delete a suggested photo for poets
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="deleteUserId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:RMuseum.Services.IRecitationService">
|
||||
<summary>
|
||||
Audio Narration Service
|
||||
|
||||
Loading…
Reference in New Issue
Block a user