| | | 1 | | using Estud.Back.Domain.Campi; |
| | | 2 | | using Estud.Back.Domain.Classes; |
| | | 3 | | using Estud.Back.Domain.Courses; |
| | | 4 | | using Estud.Back.Domain.Periods; |
| | | 5 | | using Estud.Back.Domain.Identity; |
| | | 6 | | using Estud.Back.Domain.Students; |
| | | 7 | | using Estud.Back.Domain.Teachers; |
| | | 8 | | using Estud.Back.Domain.Webhooks; |
| | | 9 | | using Estud.Back.Domain.Commands; |
| | | 10 | | using Estud.Back.Domain.Classrooms; |
| | | 11 | | using Estud.Back.Domain.Disciplines; |
| | | 12 | | using Estud.Back.Domain.Notifications; |
| | | 13 | | using Estud.Back.Domain.CourseOfferings; |
| | | 14 | | using Estud.Back.Domain.CourseCurriculums; |
| | | 15 | | |
| | | 16 | | namespace Estud.Back.Domain.Institutions; |
| | | 17 | | |
| | | 18 | | public class Institution |
| | | 19 | | { |
| | 754 | 20 | | public int Id { get; set; } |
| | 754 | 21 | | public string Name { get; set; } |
| | 754 | 22 | | public DateTime CreatedAt { get; set; } |
| | 0 | 23 | | public List<Campus> Campi { get; set; } |
| | 0 | 24 | | public List<Class> Classes { get; set; } |
| | 0 | 25 | | public List<Course> Courses { get; set; } |
| | 0 | 26 | | public List<EstudUser> Users { get; set; } |
| | 0 | 27 | | public List<Command> Commands { get; set; } |
| | 0 | 28 | | public List<Classroom> Classrooms { get; set; } |
| | 0 | 29 | | public List<EstudStudent> Students { get; set; } |
| | 0 | 30 | | public List<EstudTeacher> Teachers { get; set; } |
| | 0 | 31 | | public List<Discipline> Disciplines { get; set; } |
| | 0 | 32 | | public List<WebhookCall> WebhookCalls { get; set; } |
| | 0 | 33 | | public List<Notification> Notifications { get; set; } |
| | 0 | 34 | | public List<CommandBatch> CommandBatches { get; set; } |
| | 0 | 35 | | public List<CourseOffering> CourseOfferings { get; set; } |
| | 0 | 36 | | public List<AcademicPeriod> AcademicPeriods { get; set; } |
| | 0 | 37 | | public List<SsoConfiguration> SsoConfigurations { get; set; } |
| | 0 | 38 | | public List<EnrollmentPeriod> EnrollmentPeriods { get; set; } |
| | 0 | 39 | | public List<CourseCurriculum> CourseCurriculums { get; set; } |
| | 0 | 40 | | public List<ResetPasswordToken> ResetPasswordTokens { get; set; } |
| | 0 | 41 | | public List<WebhookSubscription> WebhookSubscriptions { get; set; } |
| | | 42 | | |
| | 364 | 43 | | public Institution() { } |
| | | 44 | | |
| | 754 | 45 | | public Institution(string name) |
| | | 46 | | { |
| | 754 | 47 | | Name = name; |
| | 754 | 48 | | CreatedAt = DateTime.UtcNow; |
| | 754 | 49 | | } |
| | | 50 | | |
| | | 51 | | public static Institution NewForUserRegister() |
| | | 52 | | { |
| | 754 | 53 | | var prefix = new List<string> { "UF", "IF" }.PickRandom(); |
| | 754 | 54 | | var state = Enum.GetValues<BrazilState>().PickRandom(); |
| | 754 | 55 | | return new Institution($"{prefix}{state}"); |
| | | 56 | | } |
| | | 57 | | } |