//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 IPhotoLasso
    {
        /// <summary>
        /// 添加照片圈人信息
        /// </summary>
        /// <param name="Info">照片圈人实体类</param>
        /// <returns>添加成功返回1</returns>
        int Add(PhotoLassoInfo Info);

        /// <summary>
        /// 删除照片圈人
        /// </summary>
        /// <param name="ID">编号</param>
        /// <param name="UserID">用户编号</param>
        /// <param name="FriendID">被圈好友编号</param>
        /// <returns>删除成功返回1</returns>
        int Del(int ID, int UserID, int FriendID);

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

        /// <summary>
        /// 取得相应照片圈人信息
        /// </summary>
        /// <param name="PhotoID">照片ID</param>
        /// <returns></returns>
        List<PhotoLassoInfo> InfoList(int PhotoID);

        /// <summary>
        /// 取得相应照片圈人信息
        /// </summary>
        /// <param name="PhotoID">用户ID</param>
        /// <returns></returns>
        List<PhotoLassoInfo> FriendInfoList(int UserID);

        /// <summary>
        /// 取得相册圈人信息
        /// </summary>
        /// <param name="AlbumID">相册ID</param>
        /// <returns></returns>
        List<PhotoLassoInfo> AlbumLasso(int AlbumID);


        /// <summary>
        /// 取得某人被圈照片圈人信息
        /// </summary>
        /// <param name="UserID">照片用户</param>
        /// <param name="isSelf">是否在自己的相册中</param>
        /// <returns></returns>
        List<PhotoLassoInfo> UserInfoList(int UserID, bool isSelf);
    }

    public sealed partial class DataAccess
    {
        public static IPhotoLasso CreatePhotoLasso()
        {
            string className = path + ".PhotoLasso";
            return (IPhotoLasso)Assembly.Load(path).CreateInstance(className);
        }
    }
}
