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

namespace JuSNS.Factory.ApiInterface
{
    public interface IUtilUser
    {
        /// <summary>
        /// 添加应用
        /// </summary>
        /// <param name="UserID"></param>
        /// <param name="AppID"></param>
        /// <returns></returns>
        int AddApp(int UserID, int AppID);
        /// <summary>
        /// 删除某应用
        /// </summary>
        /// <param name="UserID"></param>
        /// <param name="AppID"></param>
        /// <returns></returns>
        int DeleteApp(int UserID, int AppID);
        /// <summary>
        /// 取得用户的应用程序
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <returns></returns>
        List<AppInfo> GetUserApp(int UserID);
    }
    public sealed partial class DataAccess
    {
        public static IUtilUser CreateUtilUser()
        {
            string className = path + ".ApiInterface.UtilUser";
            return (IUtilUser)Assembly.Load(path).CreateInstance(className);
        }
    }
}
