| | | 1 | | namespace Syki.Shared; |
| | | 2 | | |
| | | 3 | | public class CreateUserIn |
| | | 4 | | { |
| | 3318 | 5 | | public Guid InstitutionId { get; set; } |
| | 2212 | 6 | | public string Name { get; set; } |
| | 4424 | 7 | | public string Email { get; set; } |
| | 2212 | 8 | | public string Password { get; set; } |
| | 2196 | 9 | | public UserRole Role { get; set; } |
| | 1278 | 10 | | public string? PhoneNumber { get; set; } |
| | | 11 | | |
| | | 12 | | public static CreateUserIn NewAcademic(Guid institutionId, string email, string password) |
| | | 13 | | { |
| | 652 | 14 | | return new() |
| | 652 | 15 | | { |
| | 652 | 16 | | Name = email, |
| | 652 | 17 | | Email = email, |
| | 652 | 18 | | Password = password, |
| | 652 | 19 | | Role = UserRole.Academic, |
| | 652 | 20 | | InstitutionId = institutionId, |
| | 652 | 21 | | }; |
| | | 22 | | } |
| | | 23 | | |
| | | 24 | | public static CreateUserIn NewTeacher(Guid institutionId, string name, string email) |
| | | 25 | | { |
| | 278 | 26 | | return new() |
| | 278 | 27 | | { |
| | 278 | 28 | | Name = name, |
| | 278 | 29 | | Email = email, |
| | 278 | 30 | | Role = UserRole.Teacher, |
| | 278 | 31 | | InstitutionId = institutionId, |
| | 278 | 32 | | Password = $"Teacher@{Guid.CreateVersion7()}", |
| | 278 | 33 | | }; |
| | | 34 | | } |
| | | 35 | | |
| | | 36 | | public static CreateUserIn NewStudent(Guid institutionId, string name, string email, string? phoneNumber) |
| | | 37 | | { |
| | 178 | 38 | | return new() |
| | 178 | 39 | | { |
| | 178 | 40 | | Name = name, |
| | 178 | 41 | | Email = email, |
| | 178 | 42 | | Role = UserRole.Student, |
| | 178 | 43 | | PhoneNumber = phoneNumber, |
| | 178 | 44 | | InstitutionId = institutionId, |
| | 178 | 45 | | Password = $"Student@{Guid.CreateVersion7()}", |
| | 178 | 46 | | }; |
| | | 47 | | } |
| | | 48 | | } |