using System;

namespace VioletGrass.ProjectModel.Issues
{
    /// <summary>
    /// An annotation to an issue.
    /// </summary>
    public abstract class Annotation
    {
        /// <summary>
        /// Creates an annotation.
        /// </summary>
        /// <param name="creator">The creator person name of the annotation.</param>
        /// <param name="created">Creation date of the annotation.</param>
        /// <param name="lastUpdated">The last update of the annotation.</param>
        protected Annotation(string creator, DateTimeOffset created, DateTimeOffset lastUpdated)
        {
            Creator = creator;
            Created = created;
            LastUpdated = lastUpdated;
        }

        /// <summary>
        /// Creation date of the annotation.
        /// </summary>
        public DateTimeOffset Created { get; }
        /// <summary>
        /// The creator person name of the annotation.
        /// </summary>
        public string Creator { get; }
        /// <summary>
        /// The last update of the annotation.
        /// </summary>
        public DateTimeOffset LastUpdated { get; }
    }
}
