using Edu.Model.Entity.User;
using System;
using System.Collections.Generic;

namespace Edu.Model.ViewModel.User
{
    /// <summary>
    /// 部门实体实体类
    /// </summary>
    [Serializable]
    public class RB_Department_ViewModel : RB_Department
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByName { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string UpdateByName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeStr { get { return Common.ConvertHelper.FormatTime(this.CreateTime); } }

        /// <summary>
        /// 修改时间
        /// </summary>
        public string UpdateTimeStr { get { return Common.ConvertHelper.FormatTime(this.UpdateTime); } }

        /// <summary>
        /// 集团名称
        /// </summary>
        public string GroupName { get; set; }

        /// <summary>
        /// 校区名称
        /// </summary>
        public string SchoolName { get; set; }

        /// <summary>
        /// 部门编号【逗号分隔，查询使用】
        /// </summary>
        public string QDeptIds { get; set; }


        /// <summary>
        /// 上级ids
        /// </summary>
        public string QParentIds { get; set; }

        /// <summary>
        /// 上级部门名称
        /// </summary>
        public string ParentDeptName { get; set; }

        /// <summary>
        /// 负责人姓名
        /// </summary>
        public string ManagerName { get; set; }

        /// <summary>
        /// 部门负责人数组
        /// </summary>
        public List<int> ManagerList
        {
            get
            {
                return Common.ConvertHelper.StringToList(this.ManagerIds);
            }
        }

        /// <summary>
        /// 部门管理岗位列表
        /// </summary>
        public List<RB_Department_Post_ViewModel> DeptPostList { get; set; }

        /// <summary>
        /// 选择的岗位
        /// </summary>
        public List<int> ChoosePostList { get; set; }
    }
}