| | 1 | | namespace Syki.Shared; |
| | 2 | |
|
| | 3 | | public class ClassOut |
| | 4 | | { |
| 1148 | 5 | | public Guid Id { get; set; } |
| 600 | 6 | | public string Discipline { get; set; } |
| 600 | 7 | | public string Teacher { get; set; } |
| 600 | 8 | | public string Period { get; set; } |
| 599 | 9 | | public int Vacancies { get; set; } |
| 598 | 10 | | public decimal Frequency { get; set; } |
| 600 | 11 | | public ClassStatus Status { get; set; } |
| 796 | 12 | | public List<ScheduleOut> Schedules { get; set; } |
| 1014 | 13 | | public List<LessonOut> Lessons { get; set; } = []; |
| | 14 | |
|
| 599 | 15 | | public string FillRatio { get; set; } |
| 398 | 16 | | public bool IsSelected { get; set; } |
| | 17 | |
|
| | 18 | | public override bool Equals(object? obj) |
| | 19 | | { |
| 0 | 20 | | if (obj is null) return false; |
| 0 | 21 | | return Id == ((ClassOut)obj).Id; |
| | 22 | | } |
| | 23 | |
|
| | 24 | | public override int GetHashCode() |
| | 25 | | { |
| 0 | 26 | | return Id.ToHashCode(); |
| | 27 | | } |
| | 28 | |
|
| | 29 | | public static implicit operator ClassOut(OneOf<ClassOut, ErrorOut> value) |
| | 30 | | { |
| 190 | 31 | | return value.GetSuccess(); |
| | 32 | | } |
| | 33 | | } |