View models вроде готовы

This commit is contained in:
Kirill 2024-04-30 13:16:38 +04:00
parent cb98039241
commit 550ec77222
9 changed files with 147 additions and 2 deletions

View File

@ -12,9 +12,7 @@
<ItemGroup>
<Folder Include="BusinessLogicsContracts\" />
<Folder Include="SearchModels\" />
<Folder Include="StoragesContracts\" />
<Folder Include="ViewModels\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.SearchModels
{
public class AchievementSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.SearchModels
{
public class InterestSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.SearchModels
{
public class LessonSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.SearchModels
{
public class UserSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using SchoolDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class AchievementViewModel : IAchievementModel
{
public int Id { get; set; }
public int LessonId { get; set; }
[DisplayName("Название достижения")]
public string Name { get; set; } = string.Empty;
[DisplayName("Описание достижения")]
public string Description { get; set; } = string.Empty;
[DisplayName("Дата время получения")]
public DateTime ReceiptDate { get; set; }
}
}

View File

@ -0,0 +1,26 @@
using SchoolDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
public class InterestViewModel : IInterestModel
{
public int Id { get; set; }
[DisplayName("Название интереса")]
public string Name { get; set; } = string.Empty;
[DisplayName("Направление интереса")]
public string Direction { get; set; } = string.Empty;
[DisplayName("Описание интереса")]
public string Discription { get; set; } = string.Empty;
public Dictionary<int, (ILessonModel, int)> InterestLessons
{
get;
set;
} = new();
}
}

View File

@ -0,0 +1,20 @@
using SchoolDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class LessonViewModel : ILessonModel
{
public int Id { get; set; }
public int UserId { get; set; }
[DisplayName("Время начала занятие")]
public DateTime TimeStart { get; set; }
[DisplayName("Время конца занятия")]
public DateTime TimeEnd { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using SchoolDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class UserViewModel : IUserModel
{
public int Id { get; set; }
[DisplayName("Имя пользователя")]
public string Name { get; set; } = string.Empty;
[DisplayName("Дата рождения")]
public DateTime BirthDate { get; set; }
[DisplayName("Электронная почта")]
public string Mail { get; set; } = string.Empty;
[DisplayName("Номер телефона")]
public string PhoneNumber { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}