using MadRunFabric.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace EquipmentApi.Model.Input
{
    public class WoRepairBaseInput
    {
        /// <summary>
        /// id
        /// </summary>
        public string id { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        public string wocode { get; set; } = "";

        /// <summary>
        /// 通话标识ID
        /// </summary>
        //[BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string callid { get; set; } = "";

        /// <summary>
        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
        /// </summary>
        public int channel { get; set; } = 1;

        /// <summary>
        /// 工单状态:0创建工单，1已转派（转派或者抢单），2已处理，3已评价，7挂起，8已取消，9已完成
        /// </summary>
        public int wostate { get; set; } = 0;

        /// <summary>
        /// 省code
        /// </summary>
        public string province { get; set; } = "";
        /// <summary>
        /// 市code
        /// </summary>
        public string city { get; set; } = "";
        /// <summary>
        /// 项目id
        /// </summary>
        public string projectid { get; set; }
        /// <summary>
        /// 项目类型id
        /// </summary>
        public string protypeid { get; set; }
        /// <summary>
        /// 楼id
        /// </summary>
        public string buildid { get; set; }
        /// <summary>
        /// 楼层id
        /// </summary>
        public string floorid { get; set; }
        /// <summary>
        /// 系统id
        /// </summary>
        public string systemid { get; set; }
        /// <summary>
        /// 设备名称id
        /// </summary>
        public string equipmentid { get; set; }
        
        /// <summary>
        /// 报修地点(楼栋，楼层名称，例如：办公楼 6层)
        /// </summary>
        public string repairreplace { get; set; } = "";
        /// <summary>
        /// 报修地点 - 房间号（例如：1006）
        /// </summary>
        public string repairoom { get; set; } = "";
        /// <summary>
        /// 报修时间
        /// </summary>
        public string repairtime { get; set; }

        /// <summary>
        /// 报修人
        /// </summary>
        public string repairman { get; set; } = "";
        /// <summary>
        /// 联系方式
        /// </summary>
        public string contactway { get; set; } = "";

        /// <summary>
        /// 故障说明
        /// </summary>
        public string faultdescripe { get; set; } = "";
        /// <summary>
        /// 故障图片
        /// </summary>
        public List<FileBaseModel> faultpic
        {
            get
            {
                if (_faultpic != null)
                    return _faultpic;
                else
                    return new List<FileBaseModel>(0);
            }
            set
            {
                _faultpic = value;
            }

        }
        private List<FileBaseModel> _faultpic;
        /// <summary>
        /// 预约时间
        /// </summary>
        public string appointtime { get; set; }
        /// <summary>
        /// 班组接单时间
        /// </summary>
        public DateTime? tobztimes { get; set; }
        /// <summary>
        /// 维修时效id
        /// </summary>
        public string wxtimeid { get; set; }
        /// <summary>
        /// 维修时长
        /// </summary>
        public int wxtimelethings { get; set; }

        public string assignman { get; set; }

        public string assignremark { get; set; }
        
    }
}
