using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace ConfigurationApi.Model
{
    public class Pro_Project_Info : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string project_name { get; set; }
        /// <summary>
        /// 项目所在省
        /// </summary>
        public string project_province { get; set; }
        /// <summary>
        /// 项目所在市
        /// </summary>
        public string project_city { get; set; }
        /// <summary>
        /// 项目属性
        /// </summary>
        public string project_property { get; set; }
        /// <summary>
        /// 项目小组成员
        /// </summary>
        public string project_membernum { get; set; }
        /// <summary>
        /// 项目负责人
        /// </summary>
        public string project_resperson { get; set; }
        /// <summary>
        /// 项目开始时间
        /// </summary>
        public DateTime project_starttime
        {
            get
            {
                return _project_starttime.ToLocalTime();
            }
            set
            {
                _project_starttime = value.ToLocalTime();
            }
        }

        private DateTime _project_starttime;

        /// <summary>
        /// 项目结束时间
        /// </summary>
        public DateTime project_endtime
        {
            get
            {
                return _project_endtime.ToLocalTime();
            }
            set
            {
                _project_endtime = value.ToLocalTime();
            }
        }

        private DateTime _project_endtime;


        /// <summary>
        /// 项目周期
        /// </summary>
        public string project_cycle { get; set; }
        /// <summary>
        /// 项目合同
        /// </summary>
        public string project_order { get; set; }
        /// <summary>
        /// 项目设备种类
        /// </summary>
        public int project_equipmentvariety { get; set; }
        /// <summary>
        /// 项目设备个数
        /// </summary>
        public int project_equipmentnum { get; set; }
        /// <summary>
        /// 项目图纸
        /// </summary>
        public List<FileBaseModel> project_plans { get; set; } = null;
        /// <summary>
        /// 项目简介
        /// </summary>
        public string project_profile { get; set; }
        /// <summary>
        /// 项目提醒
        /// </summary>
        public DateTime project_remind { get; set; }
        /// <summary>
        /// 是否删除(0正常-1删除)
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime createtime
        {
            get
            {
                return _createtime.ToLocalTime();
            }
            set
            {
                _createtime = value.ToLocalTime();
            }
        }

        private DateTime _createtime = DateTime.Now.ToLocalTime();
    }
}
