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; }
|
||||
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user