﻿using System;

namespace VioletGrass.ProjectModel.Issues.Annotations
{
    /// <summary>
    /// Indicates a change in assignment.
    /// </summary>
    public class AssignmentChange : Annotation
    {
        /// <summary>
        /// Creates a new assignment change annotation.
        /// </summary>
        /// <param name="oldAssignee">The old assignee of the issue.</param>
        /// <param name="newAssignee">The new assignee of the issue.</param>
        /// <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>
        public AssignmentChange(string oldAssignee, string newAssignee, string creator, DateTimeOffset created, DateTimeOffset lastUpdated)
            : base(creator, created, lastUpdated)
        {
            OldAssignee = oldAssignee;
            NewAssignee = newAssignee;
        }

        /// <summary>
        /// The old assignee of the issue.
        /// </summary>
        public string OldAssignee { get; }
        /// <summary>
        /// The new assignee of the issue.
        /// </summary>
        public string NewAssignee { get; }
    }
}
