Generator Changes at 10/13/2025 8:08:52 AM

This commit is contained in:
MeysamMoghaddam
2025-10-13 08:19:47 +03:30
parent afad9b62be
commit f7da86ec02
41 changed files with 869 additions and 5 deletions

View File

@@ -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; }
}

View File

@@ -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) =>
{

View File

@@ -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; }
}

View File

@@ -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) =>
{