namespace InABox.Core
{
    [UserTracking(typeof(User))]
    public class SecurityGroup : Entity, IRemotable, IPersistent, ILicense<CoreLicense>
    {
        [EditorSequence(1)]
        [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
        public string Code { get; set; }

        [EditorSequence(2)]
        [TextBoxEditor]
        public string Description { get; set; }

        [EditorSequence(3)]
        public ImageDocumentLink Image => InitializeField(ref _image, nameof(Image));
        private ImageDocumentLink? _image;

        public override string ToString()
        {
            return string.Format("{0}: {1}", Code, Description);
        }
    }
}