2024-11-01 19:07:13 +00:00
|
|
|
namespace Demo.Domain.Models
|
|
|
|
{
|
|
|
|
public class User
|
|
|
|
{
|
|
|
|
public required string FIO{get; set; }
|
|
|
|
public Guid Guid{get; set; }
|
|
|
|
public required Group Group{get; set; }
|
|
|
|
|
|
|
|
public static User Parse(string input)
|
|
|
|
{
|
|
|
|
string[] words = input.Split(" ");
|
|
|
|
|
|
|
|
if (words.Length < 4)
|
|
|
|
{
|
|
|
|
throw new FormatException("Input string does not have the expected number of elements.");
|
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
return new User
|
|
|
|
{
|
|
|
|
FIO = words[0],
|
|
|
|
Guid = Guid.Parse(words[1]),
|
|
|
|
Group = new Group
|
|
|
|
{
|
|
|
|
ID = Convert.ToInt32(words[2]),
|
|
|
|
Name = words[3]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
catch (FormatException ex)
|
|
|
|
{
|
|
|
|
Console.WriteLine("Error parsing input: " + ex.Message);
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-11-08 17:42:34 +00:00
|
|
|
|
|
|
|
public class UserRequest
|
|
|
|
{
|
|
|
|
public required string FIO{get; set; }
|
|
|
|
public required Group Group{get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class DeleteUsersRequest
|
|
|
|
{
|
|
|
|
public List<Guid> UsersGuid { get; set; }
|
|
|
|
}
|
2024-11-11 07:01:04 +00:00
|
|
|
|
|
|
|
public class UserPresenceInfo
|
|
|
|
{
|
|
|
|
public string FIO { get; set; }
|
|
|
|
public int LessonNumber { get; set; }
|
|
|
|
public DateOnly Date { get; set; }
|
|
|
|
public bool IsAttendance { get; set; }
|
|
|
|
}
|
2024-11-01 19:07:13 +00:00
|
|
|
}
|