using System;
using System.Collections.Generic;

namespace CCNetWrapper
{
    public class BuildLog
    {
        public string ProjectName { get; set; }
        public string BuildNumber { get; set; }
        public string Comment { get; set; }

        public string ReleaseNote { get; set; } = string.Empty;
        public List<string> ModifiedFiles { get; set; }
        public string User { get; set; }
        public DateTime Date { get; set; }
        public string Fogbugz { get; set; }

        public FogbugzWrapper.FBEvent.FBStatuses FBStatus { get; set; }

        public BuildLog()
        {
        }

        public BuildLog(string projectName, string buildNumber, string comment, string user, string date, string fogbugz, List<string> modifiedFiles)
        {
            ProjectName = projectName;
            BuildNumber = buildNumber;
            Comment = comment;
            User = user;
            Date = DateTime.Parse(date);
            Fogbugz = fogbugz;
            ModifiedFiles = modifiedFiles;
        }

        public int GetMinorBuildNumber()
        {
            return int.Parse(BuildNumber.Split('.')[2]);
        }
    }
}