Generator Changes at 10/13/2025 8:08:52 AM
This commit is contained in:
@@ -13,5 +13,13 @@ public record CreateNewUserCommand : IRequest<CreateNewUserResponseDto>
|
||||
public string? AvatarPath { get; init; }
|
||||
//شناسه والد
|
||||
public long? ParentId { get; init; }
|
||||
//اعلان ایمیل
|
||||
public bool EmailNotifications { get; init; }
|
||||
//اعلان پیامک
|
||||
public bool SmsNotifications { get; init; }
|
||||
//اعلان پوش
|
||||
public bool PushNotifications { get; init; }
|
||||
//تاریخ تولد
|
||||
public DateTime? BirthDate { get; init; }
|
||||
|
||||
}
|
||||
+6
@@ -5,6 +5,12 @@ public class CreateNewUserCommandValidator : AbstractValidator<CreateNewUserComm
|
||||
{
|
||||
RuleFor(model => model.Mobile)
|
||||
.NotEmpty();
|
||||
RuleFor(model => model.EmailNotifications)
|
||||
.NotNull();
|
||||
RuleFor(model => model.SmsNotifications)
|
||||
.NotNull();
|
||||
RuleFor(model => model.PushNotifications)
|
||||
.NotNull();
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
|
||||
@@ -15,5 +15,13 @@ public record UpdateUserCommand : IRequest<Unit>
|
||||
public bool IsRulesAccepted { get; init; }
|
||||
//تاریخ پذیرش قوانین
|
||||
public DateTime? RulesAcceptedAt { get; init; }
|
||||
//اعلان ایمیل
|
||||
public bool EmailNotifications { get; init; }
|
||||
//اعلان پیامک
|
||||
public bool SmsNotifications { get; init; }
|
||||
//اعلان پوش
|
||||
public bool PushNotifications { get; init; }
|
||||
//تاریخ تولد
|
||||
public DateTime? BirthDate { get; init; }
|
||||
|
||||
}
|
||||
+6
@@ -7,6 +7,12 @@ public class UpdateUserCommandValidator : AbstractValidator<UpdateUserCommand>
|
||||
.NotNull();
|
||||
RuleFor(model => model.IsRulesAccepted)
|
||||
.NotNull();
|
||||
RuleFor(model => model.EmailNotifications)
|
||||
.NotNull();
|
||||
RuleFor(model => model.SmsNotifications)
|
||||
.NotNull();
|
||||
RuleFor(model => model.PushNotifications)
|
||||
.NotNull();
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
|
||||
+8
@@ -30,4 +30,12 @@ public record GetAllUserByFilterQuery : IRequest<GetAllUserByFilterResponseDto>
|
||||
public bool? IsMobileVerified { get; set; }
|
||||
//تاریخ فعال سازی موبایل
|
||||
public DateTime? MobileVerifiedAt { get; set; }
|
||||
//اعلان ایمیل
|
||||
public bool? EmailNotifications { get; set; }
|
||||
//اعلان پیامک
|
||||
public bool? SmsNotifications { get; set; }
|
||||
//اعلان پوش
|
||||
public bool? PushNotifications { get; set; }
|
||||
//تاریخ تولد
|
||||
public DateTime? BirthDate { get; set; }
|
||||
}
|
||||
|
||||
+4
@@ -26,6 +26,10 @@ public class GetAllUserByFilterQueryHandler : IRequestHandler<GetAllUserByFilter
|
||||
.Where(x => request.Filter.ReferralCode == null || x.ReferralCode == request.Filter.ReferralCode)
|
||||
.Where(x => request.Filter.IsMobileVerified == null || x.IsMobileVerified == request.Filter.IsMobileVerified)
|
||||
.Where(x => request.Filter.ParentId == null || x.ParentId == request.Filter.ParentId)
|
||||
.Where(x => request.Filter.SmsNotifications == null || x.SmsNotifications == request.Filter.SmsNotifications)
|
||||
.Where(x => request.Filter.EmailNotifications == null || x.EmailNotifications == request.Filter.EmailNotifications)
|
||||
.Where(x => request.Filter.PushNotifications == null || x.PushNotifications == request.Filter.PushNotifications)
|
||||
.Where(x => request.Filter.BirthDate == null || x.BirthDate == request.Filter.BirthDate)
|
||||
;
|
||||
}
|
||||
return new GetAllUserByFilterResponseDto
|
||||
|
||||
+8
@@ -28,4 +28,12 @@ public class GetAllUserByFilterResponseDto
|
||||
public bool IsMobileVerified { get; set; }
|
||||
//تاریخ فعال سازی موبایل
|
||||
public DateTime? MobileVerifiedAt { get; set; }
|
||||
//اعلان ایمیل
|
||||
public bool EmailNotifications { get; set; }
|
||||
//اعلان پیامک
|
||||
public bool SmsNotifications { get; set; }
|
||||
//اعلان پوش
|
||||
public bool PushNotifications { get; set; }
|
||||
//تاریخ تولد
|
||||
public DateTime? BirthDate { get; set; }
|
||||
}
|
||||
|
||||
@@ -21,5 +21,13 @@ public class GetUserResponseDto
|
||||
public bool IsMobileVerified { get; set; }
|
||||
//تاریخ فعال سازی موبایل
|
||||
public DateTime? MobileVerifiedAt { get; set; }
|
||||
//اعلان ایمیل
|
||||
public bool EmailNotifications { get; set; }
|
||||
//اعلان پیامک
|
||||
public bool SmsNotifications { get; set; }
|
||||
//اعلان پوش
|
||||
public bool PushNotifications { get; set; }
|
||||
//تاریخ تولد
|
||||
public DateTime? BirthDate { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user