using System;

namespace InABox.Core
{
    
    public interface IBaseDigitalFormInstance : IEntity
    {
        DigitalFormLink Form { get; set; }
        DateTime FormStarted { get; set; }
        TimeSpan FormOpen { get; set; }
        DateTime FormCompleted { get; set; }
        DateTime FormProcessed { get; set; }
        DateTime FormCancelled { get; set; }
    }
    
    public interface ICoreDigitalFormInstance : IBaseDigitalFormInstance
    {
        [Obsolete("Replaced with Form", true)]
        QAFormLink QAForm { get; set; }
        
        [Obsolete("Replaced with FormData", true)]
        string QAData { get; set; }
        
        String Number { get; set; }

        string FormData { get; set; }

        string? BlobData { get; set; }

        [Obsolete("Replaced with FormCompleted", true)]
        DateTime QACompleted { get; set; }
        
        [Obsolete("Replaced with FormCompletedBy", true)]
        UserLink QACompletedBy { get; set; }

        UserLink FormCompletedBy { get; set; }

        Location Location { get; set; }
        
        IDigitalFormDataModel CreateDataModel(Entity? parent = null);

        Guid ParentID();
    }

    public interface IDigitalFormInstance : ICoreDigitalFormInstance
    {
    }

    public interface IDigitalFormInstance<TEntityLink> : IDigitalFormInstance where TEntityLink : IEntityLink
    {
        TEntityLink Parent { get; set; }
    }
}