using System;

namespace InABox.Core
{
    public abstract class DimensionUnitLink<T> : EntityLink<T>, IDimensionUnit where T : DimensionUnit, new()
    {
        protected DimensionUnitLink()
        {
        }

        protected DimensionUnitLink(Func<BaseObject>? entity) : base(entity)
        {
        }

        [RequiredColumn]
        public override Guid ID { get; set; }
        
        [EditorSequence(1)]
        [CodeEditor(Visible = Visible.Default, Editable = Editable.Hidden)]
        public string Code { get; set; }
        
        [EditorSequence(2)]
        [TextBoxEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
        public string Description { get; set; }

        [NullEditor]
        [RequiredColumn]
        public bool HasQuantity { get; set; }

        [NullEditor]
        [RequiredColumn]
        public bool HasLength { get; set; }

        [NullEditor]
        [RequiredColumn]
        public bool HasWidth { get; set; }

        [NullEditor]
        [RequiredColumn]
        public bool HasHeight { get; set; }

        [NullEditor]
        [RequiredColumn]
        public bool HasWeight { get; set; }

        [NullEditor]
        [RequiredColumn]
        public string Formula { get; set; }

        [NullEditor]
        [RequiredColumn]
        public string Format { get; set; }
        
    }
}