feat: Add archive and schedule fields to PublicMessages

This commit is contained in:
masoodafar-web
2025-12-06 00:16:30 +03:30
parent ed642947dc
commit 00ba911703
5 changed files with 3417 additions and 115 deletions

View File

@@ -1272,98 +1272,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.ToTable("SystemConfigurationHistories", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Message.PublicMessage", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Content")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
b.Property<DateTime>("Created")
.HasColumnType("datetime2");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<long>("CreatedByUserId")
.HasColumnType("bigint");
b.Property<DateTime>("ExpiresAt")
.HasColumnType("datetime2");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("LastModified")
.HasColumnType("datetime2");
b.Property<string>("LastModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("LinkText")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("LinkUrl")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("Priority")
.HasColumnType("int");
b.Property<DateTime>("StartsAt")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<int>("Type")
.HasColumnType("int");
b.Property<int>("ViewCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.HasKey("Id");
b.HasIndex("CreatedByUserId")
.HasDatabaseName("IX_PublicMessages_CreatedByUserId");
b.HasIndex("ExpiresAt")
.HasDatabaseName("IX_PublicMessages_ExpiresAt");
b.HasIndex("IsActive")
.HasDatabaseName("IX_PublicMessages_IsActive");
b.HasIndex("Priority")
.HasDatabaseName("IX_PublicMessages_Priority");
b.HasIndex("StartsAt")
.HasDatabaseName("IX_PublicMessages_StartsAt");
b.HasIndex("Type")
.HasDatabaseName("IX_PublicMessages_Type");
b.HasIndex("IsActive", "ExpiresAt")
.HasDatabaseName("IX_PublicMessages_IsActive_ExpiresAt");
b.ToTable("PublicMessages", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Network.NetworkWeeklyBalance", b =>
{
b.Property<long>("Id")
@@ -1921,6 +1829,113 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.ToTable("ProductTags", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.PublicMessage", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime?>("ArchivedAt")
.HasColumnType("datetime2");
b.Property<string>("Content")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
b.Property<DateTime>("Created")
.HasColumnType("datetime2");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<long>("CreatedByUserId")
.HasColumnType("bigint");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime2");
b.Property<DateTime>("ExpiresAt")
.HasColumnType("datetime2");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsArchived")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("LastModified")
.HasColumnType("datetime2");
b.Property<string>("LastModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("LinkText")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("LinkUrl")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("Priority")
.HasColumnType("int");
b.Property<DateTime?>("PublishedAt")
.HasColumnType("datetime2");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime2");
b.Property<DateTime>("StartsAt")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<int>("Type")
.HasColumnType("int");
b.Property<int>("ViewCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.HasKey("Id");
b.HasIndex("CreatedByUserId")
.HasDatabaseName("IX_PublicMessages_CreatedByUserId");
b.HasIndex("ExpiresAt")
.HasDatabaseName("IX_PublicMessages_ExpiresAt");
b.HasIndex("IsActive")
.HasDatabaseName("IX_PublicMessages_IsActive");
b.HasIndex("Priority")
.HasDatabaseName("IX_PublicMessages_Priority");
b.HasIndex("StartsAt")
.HasDatabaseName("IX_PublicMessages_StartsAt");
b.HasIndex("Type")
.HasDatabaseName("IX_PublicMessages_Type");
b.HasIndex("IsActive", "ExpiresAt")
.HasDatabaseName("IX_PublicMessages_IsActive_ExpiresAt");
b.ToTable("PublicMessages", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Role", b =>
{
b.Property<long>("Id")