//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.Reflection;
using JuSNS.Model;

namespace JuSNS.Factory
{
    /// <summary>
    /// 照片评论接口类
    /// </summary>
    public interface IPhotoComment
    {
        /// <summary>
        /// 添加照片评论
        /// </summary>
        /// <param name="Info">照片评论实体类</param>
        /// <returns>添加成功返回1</returns>
        int Add(PhotoCommentInfo Info, int UserID);

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

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

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

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

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

    public sealed partial class DataAccess
    {
        public static IPhotoComment CreatePhotoComment()
        {
            string className = path + ".PhotoComment";
            return (IPhotoComment)Assembly.Load(path).CreateInstance(className);
        }
    }
}
