Generator Changes at 11/25/2025 1:59:23 AM +03:30
This commit is contained in:
+3
-3
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//توکن Otp
|
||||
public class OtpTokenConfiguration : IEntityTypeConfiguration<OtpToken>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<OtpToken> builder)
|
||||
@@ -18,5 +17,6 @@ public class OtpTokenConfiguration : IEntityTypeConfiguration<OtpToken>
|
||||
builder.Property(entity => entity.ExpiresAt).IsRequired(true);
|
||||
builder.Property(entity => entity.Attempts).IsRequired(true);
|
||||
builder.Property(entity => entity.IsUsed).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//پکیج
|
||||
public class PackageConfiguration : IEntityTypeConfiguration<Package>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Package> builder)
|
||||
@@ -16,5 +15,6 @@ public class PackageConfiguration : IEntityTypeConfiguration<Package>
|
||||
builder.Property(entity => entity.Description).IsRequired(true);
|
||||
builder.Property(entity => entity.ImagePath).IsRequired(true);
|
||||
builder.Property(entity => entity.Price).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//نقش
|
||||
public class RoleConfiguration : IEntityTypeConfiguration<Role>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Role> builder)
|
||||
@@ -14,5 +13,6 @@ public class RoleConfiguration : IEntityTypeConfiguration<Role>
|
||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||
builder.Property(entity => entity.Name).IsRequired(true);
|
||||
builder.Property(entity => entity.Title).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//تگ
|
||||
public class TagConfiguration : IEntityTypeConfiguration<Tag>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Tag> builder)
|
||||
@@ -12,12 +11,11 @@ public class TagConfiguration : IEntityTypeConfiguration<Tag>
|
||||
builder.Ignore(entity => entity.DomainEvents);
|
||||
builder.HasKey(entity => entity.Id);
|
||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||
|
||||
builder.Property(entity => entity.Name).IsRequired(true);
|
||||
builder.Property(entity => entity.Title).IsRequired(true);
|
||||
builder.Property(entity => entity.Description).IsRequired(false);
|
||||
builder.Property(entity => entity.IsActive).IsRequired(true);
|
||||
builder.Property(entity => entity.SortOrder).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//آدرس کاربر
|
||||
public class UserAddressConfiguration : IEntityTypeConfiguration<UserAddress>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<UserAddress> builder)
|
||||
@@ -22,5 +21,6 @@ public class UserAddressConfiguration : IEntityTypeConfiguration<UserAddress>
|
||||
builder.Property(entity => entity.PostalCode).IsRequired(true);
|
||||
builder.Property(entity => entity.IsDefault).IsRequired(true);
|
||||
builder.Property(entity => entity.CityId).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,8 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
|
||||
//نقش کاربر
|
||||
public class UserRoleConfiguration : IEntityTypeConfiguration<UserRole>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<UserRole> builder)
|
||||
@@ -22,5 +21,6 @@ public class UserRoleConfiguration : IEntityTypeConfiguration<UserRole>
|
||||
.WithMany(entity => entity.UserRoles)
|
||||
.HasForeignKey(entity => entity.UserId)
|
||||
.IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -13,11 +13,13 @@ public class UserWalletChangeLogConfiguration : IEntityTypeConfiguration<UserWal
|
||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||
builder
|
||||
.HasOne(entity => entity.Wallet)
|
||||
.WithMany(entity => entity.UserWalletChangeLogs)
|
||||
.WithMany(entity => entity.WalletUserWalletChangeLogs)
|
||||
.HasForeignKey(entity => entity.WalletId)
|
||||
.IsRequired(true);
|
||||
builder.Property(entity => entity.CurrentBalance).IsRequired(true);
|
||||
builder.Property(entity => entity.ChangeValue).IsRequired(true);
|
||||
builder.Property(entity => entity.CurrentNetworkBalance).IsRequired(true);
|
||||
builder.Property(entity => entity.ChangeNerworkValue).IsRequired(true);
|
||||
builder.Property(entity => entity.IsIncrease).IsRequired(true);
|
||||
builder.Property(entity => entity.RefrenceId).IsRequired(false);
|
||||
|
||||
|
||||
+1
@@ -17,6 +17,7 @@ public class UserWalletConfiguration : IEntityTypeConfiguration<UserWallet>
|
||||
.HasForeignKey(entity => entity.UserId)
|
||||
.IsRequired(true);
|
||||
builder.Property(entity => entity.Balance).IsRequired(true);
|
||||
builder.Property(entity => entity.NetworkBalance).IsRequired(true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user