//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 IShareComment
    {
        /// <summary>
        /// 添加分享评论
        /// </summary>
        /// <param name="Info">分享评论实体类</param>
        /// <returns>添加成功返回1</returns>
        int Add(ShareCommentInfo Info);

        /// <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>
        ShareCommentInfo Info(int ID);
    }

    public sealed partial class DataAccess
    {
        public static IShareComment CreateShareComment()
        {
            string className = path + ".ShareComment";
            return (IShareComment)Assembly.Load(path).CreateInstance(className);
        }
    }
}
