//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;
using System.Collections.Generic;
using System.Text;
using JuSNS.Model;
using JuSNS.Common;
using JuSNS.Factory;

namespace JuSNS.Home
{
    /// <summary>
    /// 照片评论类
    /// </summary>
    public class PhotoComment
    {
        private IPhotoComment dal;

        /// <summary>
        /// 构造函数
        /// </summary>
        public PhotoComment()
        {
            dal = DataAccess.CreatePhotoComment();
        }

        /// <summary>
        /// 添加照片评论
        /// </summary>
        /// <param name="Info">照片评论实体类</param>
        /// <returns>添加成功返回1</returns>
        public int Add(PhotoCommentInfo Info, int UserID)
        {
            return dal.Add(Info,UserID);
        }

        /// <summary>
        /// 删除照片评论(后台)
        /// </summary>
        /// <param name="ID">评论编号</param>
        /// <returns>删除成功返回1</returns>
        public int Del(int ID)
        {
            return dal.Del(ID);
        }

        /// <summary>
        /// 删除照片评论(前台)
        /// </summary>
        /// <param name="ID">评论编号</param>
        /// <param name="UserID">会员编号</param>
        /// <returns>删除成功返回1</returns>
        public int Del(int ID, int UserID)
        {
            return dal.Del(ID, UserID);
        }

        /// <summary>
        /// 取得照片评论信息
        /// </summary>
        /// <param name="ID">评论编号</param>
        /// <returns>返回照片评论实体类</returns>
        public PhotoCommentInfo Info(int ID)
        {
            return dal.Info(ID);
        }

        /// <summary>
        /// 取得照片评论信息列表
        /// </summary>
        /// <param name="PhotoID">照片id</param>
        /// <returns></returns>
        public List<PhotoCommentInfo> InfoList(int PhotoID)
        {
            return dal.InfoList(PhotoID);
        }


        /// <summary>
        /// 取得照片回复的评论
        /// </summary>
        /// <param name="PhotoID">评论ID</param>
        /// <returns></returns>
        public List<PhotoCommentInfo> CommentList(int CommentID)
        {
            return dal.CommentList(CommentID);
        }
    }
}
