
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;

namespace Siger.Middlelayer.TpmRepository.Entities
{
    /// <summary>
    /// siger_project_repair Entity Model
    /// </summary>   
    public class siger_project_plan : TpmEntityBase
    {
        /// <summary>
        /// _project_plan_item.id
        /// </summary>
        public int itemid { get; set; } = 0;

        /// <summary>
        /// _project_machine.id
        /// </summary>
        public int machineid { get; set; } = 0;

        /// <summary>
        /// 第一次执行时间
        /// </summary>
        public string first_instruction_time { get; set; } = string.Empty;

        /// <summary>
        /// 执行周期（天） 注意和_project_plan_item.instruction_cycle保持一致
        /// </summary>
        public int instruction_cycle { get; set; } = 0;

        /// <summary>
        /// 执行人
        /// </summary>
        public string instruction_mid { get; set; } = string.Empty;
        [NotMapped]
        public List<string> instruction_mids { get { return instruction_mid.Split(',').ToList(); } }

        /// <summary>
        /// 
        /// </summary>
        public int count { get; set; } = 0;

        /// <summary>
        /// 执行日期范围，默认1一直执行(1年)，2自定义执行日期范围
        /// </summary>
        public int date_rang { get; set; } = 0;

        /// <summary>
        /// 
        /// </summary>
        public int endtime { get; set; } = 0;

        /// <summary>
        /// 
        /// </summary>
        public int starttime { get; set; } = 0;

        /// <summary>
        /// 
        /// </summary>
        public int projectid { get; set; }
    }
}
