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

namespace MadRunFabric.Model
{
    public class Chat_Message : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 会话id
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string sessionid { get; set; }
        /// <summary>
        /// 来源
        /// </summary>
        public int channel { get; set; }
        /// <summary>
        /// 消息类型
        /// </summary>
        public int type { get; set; }
        /// <summary>
        /// 步骤
        /// </summary>
        public int step { get; set; }
        /// <summary>
        /// 发送人
        /// </summary>
        public string senduser { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 选项
        /// </summary>
        public List<string> options { get; set; }
        /// <summary>
        /// 附件
        /// </summary>
        public List<FileBaseModel> files { get; set; }
        /// <summary>
        /// IP
        /// </summary>
        public string ip { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int state { get; set; }

        /// <summary>
        /// 添加人
        /// </summary>
        public string createuser { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime createtime { get; set; } = DateTime.Now;
        /// <summary>
        /// 是否删除(0正常1删除)
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 删除人
        /// </summary>
        public string deleteuser { get; set; }
        /// <summary>
        /// 删除日期
        /// </summary>
        public DateTime? deletetime { get; set; }
    }
}
