Compare commits
2 Commits
37070beac2
...
a424c0708e
Author | SHA1 | Date | |
---|---|---|---|
|
a424c0708e | ||
|
8540b924da |
@ -0,0 +1,14 @@
|
||||
using UniversityDataModels.Models;
|
||||
namespace UniversityContracts.BindingModels
|
||||
{
|
||||
public class UserBindingModel : IUserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Surname { get; set; } = String.Empty;
|
||||
public string PhoneNumber { get; set; } = String.Empty;
|
||||
public string Position { get; set; } = String.Empty;
|
||||
public string Login { get; set; } = String.Empty;
|
||||
public string Password { get; set; } = String.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using UniversityContracts.BindingModels;
|
||||
using UniversityContracts.SearchModels;
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IUserLogic
|
||||
{
|
||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||
UserViewModel? ReadElement(UserSearchModel model);
|
||||
bool Create(UserBindingModel model);
|
||||
bool Update(UserBindingModel model);
|
||||
bool Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace UniversityContracts.SearchModels
|
||||
{
|
||||
public class UserSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Login { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using UniversityContracts.BindingModels;
|
||||
using UniversityContracts.SearchModels;
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IUserStorage
|
||||
{
|
||||
List<UserViewModel> GetFullList();
|
||||
List<UserViewModel> GetFilteredList(UserSearchModel model);
|
||||
UserViewModel? GetElement(UserSearchModel model);
|
||||
UserViewModel? Insert(UserBindingModel model);
|
||||
UserViewModel? Update(UserBindingModel model);
|
||||
UserViewModel? Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
14
University/UniversityContracts/ViewModels/UserViewModel.cs
Normal file
14
University/UniversityContracts/ViewModels/UserViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using UniversityDataModels.Models;
|
||||
namespace UniversityContracts.ViewModels
|
||||
{
|
||||
public class UserViewModel : IUserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Surname { get; set; } = String.Empty;
|
||||
public string PhoneNumber { get; set; } = String.Empty;
|
||||
public string Position { get; set; } = String.Empty;
|
||||
public string Login { get; set; } = String.Empty;
|
||||
public string Password { get; set; } = String.Empty;
|
||||
}
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UniversityDataModels.Enums
|
||||
namespace UniversityDataModels.Enums
|
||||
{
|
||||
public enum MarkType
|
||||
{
|
||||
|
18
University/UniversityDataModels/Models/IUserModel.cs
Normal file
18
University/UniversityDataModels/Models/IUserModel.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IUserModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
string Surname { get; }
|
||||
string PhoneNumber { get; }
|
||||
string Position { get; }
|
||||
string Login { get; }
|
||||
string Password { get; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user