using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Ourmsg.Server
{
    /// <summary>
    /// 文件信息
    /// </summary>
    public class ServerFileInfo
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="MD5">文件MD5值</param>
        public ServerFileInfo(string MD5)
        {
            this.MD5 = MD5;
        }

        /// <summary>
        /// 文件上传者 
        /// </summary>
        public UInt32  userID  ;
         
        /// <summary>
        /// 文件MD5
        /// </summary>
        public string MD5 = "";

        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string Extension = "";

        /// <summary>
        /// 已上传长度
        /// </summary>
        public long currLength = 0;

        /// <summary>
        /// 文件长度
        /// </summary>
        public long Length = 0;

        /// <summary>
        /// 文件二进制数据
        /// </summary>
        public byte[] Data = new byte[0];

        /// <summary>
        /// 文件读写流
        /// </summary>
        public FileStream FS = null;

        /// <summary>
        /// 最后一次激活时间
        /// </summary>
        public DateTime LastActivity = DateTime.Now;
    }
}
