using SecuritySystemContracts.Attributes;
using SecuritySystemDataModels.Enums;
using SecuritySystemDataModels.Models;
using System.ComponentModel;

namespace SecuritySystemContracts.ViewModels
{
    public class OrderViewModel : IOrderModel
    {
        [Column(title: "Номер", gridViewAutoSize: GridViewAutoSize.ColumnHeader, isUseAutoSize: true)]
        public int Id { get; set; }
        [Column(visible: false)]
        public int ClientId { get; set; }
        [Column(visible: false)]
        public int SecureId { get; set; }
        [Column(visible: false)]
        public int? ImplementerId { get; set; }
        [Column(title: "ФИО работника", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
        public string ImplementerFIO { get; set; } = string.Empty;
        [Column(title: "ФИО клиента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
        public string ClientFIO { get; set; } = string.Empty;
        [Column(title: "Изделие", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
        public string SecureName { get; set; } = string.Empty;
        [Column(title: "Количество", gridViewAutoSize: GridViewAutoSize.ColumnHeader, isUseAutoSize: true)]
        public int Count { get; set; }
        [Column(title: "Сумма", width: 40)]
        public double Sum { get; set; }
        [Column(title: "Статус", gridViewAutoSize: GridViewAutoSize.ColumnHeader, isUseAutoSize: true)]
        public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
        [Column(title: "Дата создания", gridViewAutoSize: GridViewAutoSize.ColumnHeader, isUseAutoSize: true)]
        public DateTime DateCreate { get; set; } = DateTime.Now;
        [Column(title: "Дата выполнения", gridViewAutoSize: GridViewAutoSize.ColumnHeader, isUseAutoSize: true)]
        public DateTime? DateImplement { get; set; }
    }
}
