using System;
using System.Collections.Generic;
using System.Text;
using JuSNS.Model.ApiInterface;
using System.Reflection;

namespace JuSNS.Factory.ApiInterface
{
    /// <summary>
    /// 活动接口
    /// </summary>
    public interface IActivity
    {
        /// <summary>
        /// 添加动态信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        int Add(AppActiveInfo info);
        /// <summary>
        /// 删除动态
        /// </summary>
        /// <param name="AppID"></param>
        /// <param name="ActiveID"></param>       
        /// <returns></returns>
        int Del(int AppID,int ActiveID);
        /// <summary>
        /// 取得某人的动态
        /// </summary>
        /// <param name="AppID"></param>
        /// <param name="UserID"></param>
        /// <param name="Num"></param>
        /// <returns></returns>
        List<AppActiveInfo> GetList(int AppID, int UserID, int Num);
        /// <summary>
        /// 取得某人包括其好友的动态
        /// </summary>
        /// <param name="AppID"></param>
        /// <param name="UserID"></param>
        /// <param name="Num"></param>
        /// <returns></returns>
        List<AppActiveInfo> GetFriendActivity(int AppID, int UserID, int Num);
        /// <summary>
        /// 取得动态详细信息
        /// </summary>
        /// <param name="AppID"></param>
        /// <param name="ActiveID">动态ID</param>        
        /// <returns></returns>
        AppActiveInfo GetInfo(int AppID,int ActiveID);
    }
    public sealed partial class DataAccess
    {
        public static IActivity CreateActivity()
        {
            string className = path + ".ApiInterface.Activity";
            return (IActivity)Assembly.Load(path).CreateInstance(className);
        }
    }
}
