diff --git a/ZpcBulletinBoard/Migrations/20240228165943_4.Designer.cs b/ZpcBulletinBoard/Migrations/20240228165943_4.Designer.cs new file mode 100644 index 0000000..6f2e3ab --- /dev/null +++ b/ZpcBulletinBoard/Migrations/20240228165943_4.Designer.cs @@ -0,0 +1,401 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using ZpcBulletinBoard.Data; + +#nullable disable + +namespace ZpcBulletinBoard.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20240228165943_4")] + partial class _4 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoard", b => + { + b.Property("IdBulletinBoard") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Guid") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Ratio") + .HasColumnType("int"); + + b.HasKey("IdBulletinBoard"); + + b.ToTable("BulletinBoards"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.Property("IdBulletinBoardPage") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("IdBulletinBoard") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("IdBulletinBoardPage"); + + b.HasIndex("IdBulletinBoard"); + + b.ToTable("BulletinBoardPage"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.Note", b => + { + b.Property("IdNote") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Height") + .HasColumnType("int"); + + b.Property("IdBulletinBoardPage") + .HasColumnType("int"); + + b.Property("Width") + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("int"); + + b.Property("Y") + .HasColumnType("int"); + + b.HasKey("IdNote"); + + b.HasIndex("IdBulletinBoardPage"); + + b.ToTable("Notes"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.IdentityApplicationRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.IdentityApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("DateCreated") + .HasColumnType("datetime(6)"); + + b.Property("DateValidUntil") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("Surname") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.HasOne("ZpcBulletinBoard.Models.Editor.BulletinBoard", "BulletinBoard") + .WithMany("Pages") + .HasForeignKey("IdBulletinBoard") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BulletinBoard"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.Note", b => + { + b.HasOne("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", "BulletinBoardPage") + .WithMany("Notes") + .HasForeignKey("IdBulletinBoardPage") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BulletinBoardPage"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoard", b => + { + b.Navigation("Pages"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.Navigation("Notes"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ZpcBulletinBoard/Migrations/20240228165943_4.cs b/ZpcBulletinBoard/Migrations/20240228165943_4.cs new file mode 100644 index 0000000..f03f30b --- /dev/null +++ b/ZpcBulletinBoard/Migrations/20240228165943_4.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ZpcBulletinBoard.Migrations +{ + /// + public partial class _4 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Title", + table: "Notes"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Title", + table: "Notes", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/ZpcBulletinBoard/Migrations/20240228173917_5.Designer.cs b/ZpcBulletinBoard/Migrations/20240228173917_5.Designer.cs new file mode 100644 index 0000000..516b9ca --- /dev/null +++ b/ZpcBulletinBoard/Migrations/20240228173917_5.Designer.cs @@ -0,0 +1,408 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using ZpcBulletinBoard.Data; + +#nullable disable + +namespace ZpcBulletinBoard.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20240228173917_5")] + partial class _5 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoard", b => + { + b.Property("IdBulletinBoard") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Guid") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Ratio") + .HasColumnType("int"); + + b.HasKey("IdBulletinBoard"); + + b.ToTable("BulletinBoards"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.Property("IdBulletinBoardPage") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("IdBulletinBoard") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("IdBulletinBoardPage"); + + b.HasIndex("IdBulletinBoard"); + + b.ToTable("BulletinBoardPage"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.Note", b => + { + b.Property("IdNote") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ColorClass") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Height") + .HasColumnType("int"); + + b.Property("IdBulletinBoardPage") + .HasColumnType("int"); + + b.Property("Width") + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("int"); + + b.Property("Y") + .HasColumnType("int"); + + b.Property("Zindex") + .HasColumnType("int"); + + b.HasKey("IdNote"); + + b.HasIndex("IdBulletinBoardPage"); + + b.ToTable("Notes"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.IdentityApplicationRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.IdentityApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("DateCreated") + .HasColumnType("datetime(6)"); + + b.Property("DateValidUntil") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("Surname") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("ZpcBulletinBoard.Models.IdentityApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.HasOne("ZpcBulletinBoard.Models.Editor.BulletinBoard", "BulletinBoard") + .WithMany("Pages") + .HasForeignKey("IdBulletinBoard") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BulletinBoard"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.Note", b => + { + b.HasOne("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", "BulletinBoardPage") + .WithMany("Notes") + .HasForeignKey("IdBulletinBoardPage") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BulletinBoardPage"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoard", b => + { + b.Navigation("Pages"); + }); + + modelBuilder.Entity("ZpcBulletinBoard.Models.Editor.BulletinBoardPage", b => + { + b.Navigation("Notes"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ZpcBulletinBoard/Migrations/20240228173917_5.cs b/ZpcBulletinBoard/Migrations/20240228173917_5.cs new file mode 100644 index 0000000..d4eb8b2 --- /dev/null +++ b/ZpcBulletinBoard/Migrations/20240228173917_5.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ZpcBulletinBoard.Migrations +{ + /// + public partial class _5 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ColorClass", + table: "Notes", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "Zindex", + table: "Notes", + type: "int", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ColorClass", + table: "Notes"); + + migrationBuilder.DropColumn( + name: "Zindex", + table: "Notes"); + } + } +} diff --git a/ZpcBulletinBoard/Migrations/ApplicationDbContextModelSnapshot.cs b/ZpcBulletinBoard/Migrations/ApplicationDbContextModelSnapshot.cs index 3427f62..0b2a9d2 100644 --- a/ZpcBulletinBoard/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/ZpcBulletinBoard/Migrations/ApplicationDbContextModelSnapshot.cs @@ -168,6 +168,10 @@ namespace ZpcBulletinBoard.Migrations .ValueGeneratedOnAdd() .HasColumnType("int"); + b.Property("ColorClass") + .IsRequired() + .HasColumnType("longtext"); + b.Property("Content") .IsRequired() .HasColumnType("longtext"); @@ -178,10 +182,6 @@ namespace ZpcBulletinBoard.Migrations b.Property("IdBulletinBoardPage") .HasColumnType("int"); - b.Property("Title") - .IsRequired() - .HasColumnType("longtext"); - b.Property("Width") .HasColumnType("int"); @@ -191,6 +191,9 @@ namespace ZpcBulletinBoard.Migrations b.Property("Y") .HasColumnType("int"); + b.Property("Zindex") + .HasColumnType("int"); + b.HasKey("IdNote"); b.HasIndex("IdBulletinBoardPage"); diff --git a/ZpcBulletinBoard/Models/Editor/Note.cs b/ZpcBulletinBoard/Models/Editor/Note.cs index 457c128..93e0939 100644 --- a/ZpcBulletinBoard/Models/Editor/Note.cs +++ b/ZpcBulletinBoard/Models/Editor/Note.cs @@ -25,10 +25,13 @@ namespace ZpcBulletinBoard.Models.Editor public int Height { get; set; } [Required] - public string Title { get; set; } + public string Content { get; set; } [Required] - public string Content { get; set; } + public int Zindex { get; set; } + + [Required] + public string ColorClass { get; set; } // ForeignKey public BulletinBoardPage BulletinBoardPage { get; set; } diff --git a/ZpcBulletinBoard/Pages/Editor/EditMain.cshtml b/ZpcBulletinBoard/Pages/Editor/EditMain.cshtml index 932a4de..4e88d66 100644 --- a/ZpcBulletinBoard/Pages/Editor/EditMain.cshtml +++ b/ZpcBulletinBoard/Pages/Editor/EditMain.cshtml @@ -9,21 +9,28 @@ } +
+
+ +
+
+ +
+
+ +
+
-
- - -
-
-
Ime page
- 20 sekund +
+
Oglasna deska ni izbrana
+  Spremni oglasno desko
-
+
@@ -37,20 +44,7 @@
-
-
- - -
- -
- -
- +
@@ -109,7 +103,7 @@
@@ -127,7 +121,18 @@