uchet_techniki/Models.cs

56 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
namespace Учетещей
{
// Перечисление для типов оборудования
public enum DeviceType
{
Компьютер,
Ноутбук,
Монитор,
Принтер,
Сканер,
МФУ,
Проектор,
Другое
}
// Перечисление для состояния техники
public enum DeviceState
{
Исправен,
Ремонт,
Списан
}
// Класс для хранения данных о технике
public class Device
{
public int Id { get; set; }
public string Name { get; set; }
public string InventoryNumber { get; set; }
public DeviceType Type { get; set; }
public string Location { get; set; }
public string ResponsiblePerson { get; set; }
public DeviceState State { get; set; }
public DateTime RegistrationDate { get; set; }
public string TypeString => Type.ToString();
public string StateString => State.ToString();
}
// Класс для пользователей
public enum UserRole
{
User,
Admin
}
public class User
{
public string Username { get; set; }
public string Password { get; set; }
public UserRole Role { get; set; }
}
}