//by JuSNS v1.0系列
//官方站：www.juSNS.com，演示站:www.ju001.com，www.julala.cn
//QQ:655071(技术)，QQ:9170617（客服）
//MSN:simplt@163.com EMail:simplt@163.com
//program design by Simplt.Xie，arjun
//========================================
using System;
using System.Collections.Generic;
using System.Text;

namespace JuSNS.Model
{
    /// <summary>
    /// 照片实体类
    /// </summary>
    public class PhotoInfo
    {
        private int _PhotoID;
        private int _AlbumID;
        private int _UploadUser;
        private string _Description;
        private int _Views;
        private int _FileSize;
        private int _State;
        private bool _IsCover;
        private int _Comments;
        private DateTime _PostTime;
        private string _PostIP;
        private EnumIsLock _IsLock;
        private int _PhotoType;
        private int _Width;
        private int _Height;
        private string _FilePath;

        /// <summary>
        /// 照片ID(自增长)
        /// </summary>
        public int PhotoID
        {
            get { return _PhotoID; }
            set { _PhotoID = value; }
        }

        /// <summary>
        /// 所属相册ID
        /// </summary>
        public int AlbumID
        {
            get { return _AlbumID; }
            set { _AlbumID = value; }
        }

        /// <summary>
        /// 上传者会员编号
        /// </summary>
        public int UploadUser
        {
            get { return _UploadUser; }
            set { _UploadUser = value; }
        }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

        /// <summary>
        /// 被查看次数
        /// </summary>
        public int Views
        {
            get { return _Views; }
            set { _Views = value; }
        }

        /// <summary>
        /// 文件大小(字节)
        /// </summary>
        public int FileSize
        {
            get { return _FileSize; }
            set { _FileSize = value; }
        }

        /// <summary>
        /// 状态
        /// </summary>
        public int State
        {
            get { return _State; }
            set { _State = value; }
        }

        /// <summary>
        /// 是否封面
        /// </summary>
        public bool IsCover
        {
            get { return _IsCover; }
            set { _IsCover = value; }
        }

        /// <summary>
        /// 被评论次数
        /// </summary>
        public int Comments
        {
            get { return _Comments; }
            set { _Comments = value; }
        }

        /// <summary>
        /// 上传时间
        /// </summary>
        public DateTime PostTime
        {
            get { return _PostTime; }
            set { _PostTime = value; }
        }

        /// <summary>
        /// 上传时IP
        /// </summary>
        public string PostIP
        {
            get { return _PostIP; }
            set { _PostIP = value; }
        }

        /// <summary>
        /// 是否锁定
        /// </summary>
        public EnumIsLock IsLock
        {
            get { return _IsLock; }
            set { _IsLock = value; }
        }

        /// <summary>
        /// 照片类型(0:头像,1:一般照片)
        /// </summary>
        public int PhotoType
        {
            get { return _PhotoType; }
            set { _PhotoType = value; }
        }

        /// <summary>
        /// 照片原始宽度
        /// </summary>
        public int Width
        {
            get { return _Width; }
            set { _Width = value; }
        }

        /// <summary>
        /// 照片原始高度
        /// </summary>
        public int Height
        {
            get { return _Height; }
            set { _Height = value; }
        }

        /// <summary>
        /// 原始大小文件路径
        /// </summary>
        public string FilePath
        {
            get {
                if (string.IsNullOrEmpty(_FilePath))
                {
                    return "";
                }
                if (_FilePath.StartsWith("~/"))
                {
                    return _FilePath.Substring(2);
                }
                else
                {
                    return _FilePath;
                }
            }
            set { _FilePath = value; }
        }
    }
}
