This commit is contained in:
masoodafar-web
2025-11-25 02:08:28 +03:30
parent 92a9a0e75d
commit 1b146b338f
5 changed files with 1395 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ public class UserWalletChangeLogConfiguration : IEntityTypeConfiguration<UserWal
builder.Property(entity => entity.Id).UseIdentityColumn();
builder
.HasOne(entity => entity.Wallet)
.WithMany(entity => entity.WalletUserWalletChangeLogs)
.WithMany(entity => entity.UserWalletChangeLogs)
.HasForeignKey(entity => entity.WalletId)
.IsRequired(true);
builder.Property(entity => entity.CurrentBalance).IsRequired(true);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class u11 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "NetworkBalance",
schema: "CMS",
table: "UserWallets",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<long>(
name: "ChangeNerworkValue",
schema: "CMS",
table: "UserWalletChangeLogs",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<long>(
name: "CurrentNetworkBalance",
schema: "CMS",
table: "UserWalletChangeLogs",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NetworkBalance",
schema: "CMS",
table: "UserWallets");
migrationBuilder.DropColumn(
name: "ChangeNerworkValue",
schema: "CMS",
table: "UserWalletChangeLogs");
migrationBuilder.DropColumn(
name: "CurrentNetworkBalance",
schema: "CMS",
table: "UserWalletChangeLogs");
}
}
}

View File

@@ -958,6 +958,9 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.Property<string>("LastModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property<long>("NetworkBalance")
.HasColumnType("bigint");
b.Property<long>("UserId")
.HasColumnType("bigint");
@@ -976,6 +979,9 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<long>("ChangeNerworkValue")
.HasColumnType("bigint");
b.Property<long>("ChangeValue")
.HasColumnType("bigint");
@@ -988,6 +994,9 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.Property<long>("CurrentBalance")
.HasColumnType("bigint");
b.Property<long>("CurrentNetworkBalance")
.HasColumnType("bigint");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");

View File

@@ -3,7 +3,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.125</Version>
<Version>0.0.126</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>