feat: implement Kavenegar SMS service and refactor system configurations to use static constants
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m38s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m38s
This commit is contained in:
+3561
File diff suppressed because it is too large
Load Diff
+108
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemoveSystemConfigurationsTables : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SystemConfigurationHistories",
|
||||
schema: "CMS");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SystemConfigurations",
|
||||
schema: "CMS");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SystemConfigurations",
|
||||
schema: "CMS",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Created = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DataType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
|
||||
Key = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
LastModified = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifiedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Scope = table.Column<int>(type: "int", nullable: false),
|
||||
Value = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SystemConfigurations", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SystemConfigurationHistories",
|
||||
schema: "CMS",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ConfigurationId = table.Column<long>(type: "bigint", nullable: false),
|
||||
Created = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
|
||||
Key = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
LastModified = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifiedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
NewValue = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
|
||||
OldValue = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
|
||||
PerformedBy = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
Reason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
Scope = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SystemConfigurationHistories", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SystemConfigurationHistories_SystemConfigurations_ConfigurationId",
|
||||
column: x => x.ConfigurationId,
|
||||
principalSchema: "CMS",
|
||||
principalTable: "SystemConfigurations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemConfigurationHistory_ConfigId_Created",
|
||||
schema: "CMS",
|
||||
table: "SystemConfigurationHistories",
|
||||
columns: new[] { "ConfigurationId", "Created" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemConfigurationHistory_Scope_Key",
|
||||
schema: "CMS",
|
||||
table: "SystemConfigurationHistories",
|
||||
columns: new[] { "Scope", "Key" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemConfiguration_IsActive",
|
||||
schema: "CMS",
|
||||
table: "SystemConfigurations",
|
||||
column: "IsActive");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemConfiguration_Scope_Key",
|
||||
schema: "CMS",
|
||||
table: "SystemConfigurations",
|
||||
columns: new[] { "Scope", "Key" },
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
-138
@@ -503,65 +503,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("AppVersions", "CMS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Configuration.SystemConfiguration", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DataType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime?>("LastModified")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModifiedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Scope")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsActive")
|
||||
.HasDatabaseName("IX_SystemConfiguration_IsActive");
|
||||
|
||||
b.HasIndex("Scope", "Key")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("IX_SystemConfiguration_Scope_Key");
|
||||
|
||||
b.ToTable("SystemConfigurations", "CMS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Contract", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
@@ -1504,69 +1445,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("NetworkMembershipHistories", "CMS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.History.SystemConfigurationHistory", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<long>("ConfigurationId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime?>("LastModified")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastModifiedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NewValue")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<string>("OldValue")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<string>("PerformedBy")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("Scope")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConfigurationId", "Created")
|
||||
.HasDatabaseName("IX_SystemConfigurationHistory_ConfigId_Created");
|
||||
|
||||
b.HasIndex("Scope", "Key")
|
||||
.HasDatabaseName("IX_SystemConfigurationHistory_Scope_Key");
|
||||
|
||||
b.ToTable("SystemConfigurationHistories", "CMS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Network.NetworkWeeklyBalance", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
@@ -3238,17 +3116,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("WeekDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.History.SystemConfigurationHistory", b =>
|
||||
{
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.Configuration.SystemConfiguration", "Configuration")
|
||||
.WithMany("SystemConfigurationHistories")
|
||||
.HasForeignKey("ConfigurationId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Configuration");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Network.NetworkWeeklyBalance", b =>
|
||||
{
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.User", "User")
|
||||
@@ -3553,11 +3420,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("UserCommissionPayouts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Configuration.SystemConfiguration", b =>
|
||||
{
|
||||
b.Navigation("SystemConfigurationHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Contract", b =>
|
||||
{
|
||||
b.Navigation("UserContracts");
|
||||
|
||||
Reference in New Issue
Block a user