Generator Changes at 10/13/2025 7:47:49 AM

This commit is contained in:
MeysamMoghaddam
2025-10-13 07:48:57 +03:30
parent 9238987c17
commit 8eeebcee6f
8 changed files with 11 additions and 25 deletions

View File

@@ -1,8 +1,6 @@
namespace FrontOffice.BFF.Application.UserAddressCQ.Commands.CreateNewUserAddress; namespace FrontOffice.BFF.Application.UserAddressCQ.Commands.CreateNewUserAddress;
public record CreateNewUserAddressCommand : IRequest<CreateNewUserAddressResponseDto> public record CreateNewUserAddressCommand : IRequest<CreateNewUserAddressResponseDto>
{ {
//شناسه کاربر
public long UserId { get; init; }
//عنوان //عنوان
public string Title { get; init; } public string Title { get; init; }
//آدرس //آدرس

View File

@@ -3,8 +3,6 @@ public class CreateNewUserAddressCommandValidator : AbstractValidator<CreateNewU
{ {
public CreateNewUserAddressCommandValidator() public CreateNewUserAddressCommandValidator()
{ {
RuleFor(model => model.UserId)
.NotNull();
RuleFor(model => model.Title) RuleFor(model => model.Title)
.NotEmpty(); .NotEmpty();
RuleFor(model => model.Address) RuleFor(model => model.Address)

View File

@@ -3,8 +3,6 @@ public record UpdateUserAddressCommand : IRequest<Unit>
{ {
//شناسه //شناسه
public long Id { get; init; } public long Id { get; init; }
//شناسه کاربر
public long UserId { get; init; }
//عنوان //عنوان
public string Title { get; init; } public string Title { get; init; }
//آدرس //آدرس

View File

@@ -5,8 +5,6 @@ public class UpdateUserAddressCommandValidator : AbstractValidator<UpdateUserAdd
{ {
RuleFor(model => model.Id) RuleFor(model => model.Id)
.NotNull(); .NotNull();
RuleFor(model => model.UserId)
.NotNull();
RuleFor(model => model.Title) RuleFor(model => model.Title)
.NotEmpty(); .NotEmpty();
RuleFor(model => model.Address) RuleFor(model => model.Address)

View File

@@ -4,7 +4,7 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Version>0.0.112</Version> <Version>0.0.113</Version>
<DebugType>None</DebugType> <DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild> <GeneratePackageOnBuild>False</GeneratePackageOnBuild>

View File

@@ -45,12 +45,11 @@ service UserAddressContract
} }
message CreateNewUserAddressRequest message CreateNewUserAddressRequest
{ {
int64 user_id = 1; string title = 1;
string title = 2; string address = 2;
string address = 3; string postal_code = 3;
string postal_code = 4; bool is_default = 4;
bool is_default = 5; int64 city_id = 5;
int64 city_id = 6;
} }
message CreateNewUserAddressResponse message CreateNewUserAddressResponse
{ {
@@ -59,12 +58,11 @@ message CreateNewUserAddressResponse
message UpdateUserAddressRequest message UpdateUserAddressRequest
{ {
int64 id = 1; int64 id = 1;
int64 user_id = 2; string title = 2;
string title = 3; string address = 3;
string address = 4; string postal_code = 4;
string postal_code = 5; bool is_default = 5;
bool is_default = 6; int64 city_id = 6;
int64 city_id = 7;
} }
message DeleteUserAddressRequest message DeleteUserAddressRequest
{ {

View File

@@ -6,8 +6,6 @@ public class CreateNewUserAddressRequestValidator : AbstractValidator<CreateNewU
{ {
public CreateNewUserAddressRequestValidator() public CreateNewUserAddressRequestValidator()
{ {
RuleFor(model => model.UserId)
.NotNull();
RuleFor(model => model.Title) RuleFor(model => model.Title)
.NotEmpty(); .NotEmpty();
RuleFor(model => model.Address) RuleFor(model => model.Address)

View File

@@ -8,8 +8,6 @@ public class UpdateUserAddressRequestValidator : AbstractValidator<UpdateUserAdd
{ {
RuleFor(model => model.Id) RuleFor(model => model.Id)
.NotNull(); .NotNull();
RuleFor(model => model.UserId)
.NotNull();
RuleFor(model => model.Title) RuleFor(model => model.Title)
.NotEmpty(); .NotEmpty();
RuleFor(model => model.Address) RuleFor(model => model.Address)