using System;

namespace XLAB2
{
    public sealed class DirectoryLookupItem
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public override string ToString()
        {
            return Name ?? string.Empty;
        }
    }

    public sealed class TipsDirectoryItem
    {
        public int Id { get; set; }

        public int MeasurementAreaId { get; set; }

        public string MeasurementAreaName { get; set; }

        public int InstrumentNameId { get; set; }

        public string InstrumentName { get; set; }

        public int? CategoryId { get; set; }

        public string CategoryName { get; set; }

        public int? DesignId { get; set; }

        public string DesignName { get; set; }

        public string TypeName { get; set; }

        public int? ServiceLifeYears { get; set; }

        public int? RegistryPeriodMonths { get; set; }

        public string RegistryTypeNumber { get; set; }

        public int? VniimsTypeCode { get; set; }

        public string MetrControlCode { get; set; }

        public string Notes { get; set; }

        public bool? IsSpecialPurpose { get; set; }

        public bool? IsMkPrimaryOnly { get; set; }
    }

    public sealed class TprzDirectoryItem
    {
        public int Id { get; set; }

        public int TipsId { get; set; }

        public int? CompletenessId { get; set; }

        public string CompletenessName { get; set; }

        public string RangeText { get; set; }

        public string AccuracyText { get; set; }

        public int? VniimsTypeSizeCode { get; set; }

        public string RegistryTypeSizeNumber { get; set; }

        public string ServiceCode { get; set; }
    }

    public sealed class TprmcpDirectoryItem
    {
        public int Id { get; set; }

        public int TypeSizeId { get; set; }

        public int? CycleId { get; set; }

        public string CycleName { get; set; }

        public int? GroupId { get; set; }

        public string GroupName { get; set; }

        public int PeriodMonths { get; set; }

        public string Comment { get; set; }
    }

    public sealed class TprmkDirectoryItem
    {
        public int Id { get; set; }

        public int TypeSizeId { get; set; }

        public int VerificationTypeId { get; set; }

        public string VerificationTypeName { get; set; }

        public int OrganizationId { get; set; }

        public string OrganizationName { get; set; }

        public int? QualificationId { get; set; }

        public string QualificationName { get; set; }

        public int? GroupId { get; set; }

        public string GroupName { get; set; }

        public int? PlaceId { get; set; }

        public string PlaceName { get; set; }

        public decimal? Cost { get; set; }

        public decimal? ExtraCost { get; set; }

        public decimal? RushMarkup { get; set; }

        public decimal? TimeNormHours { get; set; }

        public string TimeNormCode { get; set; }

        public int VerifierCount { get; set; }

        public string VerificationCode { get; set; }

        public decimal? NormDocHours { get; set; }
    }

    public sealed class TpvdklDirectoryItem
    {
        public int Id { get; set; }

        public int TipsId { get; set; }

        public int VerificationTypeId { get; set; }

        public string VerificationTypeName { get; set; }

        public int StampKindId { get; set; }

        public string StampKindName { get; set; }
    }

    internal sealed class DirectoryDeleteResult
    {
        public bool IsDeleted { get; set; }

        public string WarningMessage { get; set; }
    }

    internal static class TipsDirectoryRules
    {
        public const int TypeNameMaxLength = 160;

        public const int RegistryTypeNumberMaxLength = 8;

        public const int MetrControlCodeMaxLength = 11;
    }

    internal static class TprzDirectoryRules
    {
        public const int RangeTextMaxLength = 160;

        public const int AccuracyTextMaxLength = 140;

        public const int RegistryTypeSizeNumberMaxLength = 8;

        public const int ServiceCodeMaxLength = 10;
    }

    internal static class TprmcpDirectoryRules
    {
    }

    internal static class TprmkDirectoryRules
    {
        public const int TimeNormCodeMaxLength = 7;

        public const int VerificationCodeMaxLength = 15;
    }
}
