using System;
using System.Collections.Generic;
using System.Text;
using NBear.Common.Design;

//ORMÉè¼Æ´úÂë
namespace Aspxcn.Designs
{
    public interface Lists : Entity
    {
        [PrimaryKey]
        int ListId { get; }
        [SqlType("nvarchar(50)")]
        string UserName { get; set; }
        int Catalog { get; set; }
        int Class { get; set; }
        bool IsTop { get; set; }
        DateTime _Date { get; set; }
        [SqlType("ntext")]
        string _Content { get; set; }
        [SqlType("nvarchar(100)")]
        string _Title { get; set; }
        int Hits { get; set; }
        int Reply { get; set; }
        int Type { get; set; }
        [SqlType("nvarchar(50)")]
        string Email { get; set; }
        bool Recommend { get; set; }
        [SqlType("nvarchar(20)")]
        string IP { get; set; }

        [CustomQuery("{id} = @Catalog", LazyLoad = true)]
        Catalog Catalog1
        {
            get;
        }
    }

    public interface Reply : Entity
    {
        [PrimaryKey]
        int id { get; }
        [IndexProperty]
        int TopIc_ID { get; set; }
        [SqlType("nvarchar(100)")]
        string _Title { get; set; }
        [SqlType("ntext")]
        string _Content { get; set; }
        [SqlType("nvarchar(50)")]
        string UserName { get; set; }
        [SqlType("nvarchar(50)")]
        string Email { get; set; }
        [SqlType("nchar(20)")]
        string IP { get; set; }
        DateTime _DateTime { get; set; }
    }

    public interface fav : Entity
    {
        [PrimaryKey]
        int Listid { get; }
        [SqlType("nchar(10)")]
        string UserName { get; set; }
        DateTime Add_DateTime { get; set; }
        int favID { get; set; }
        [CustomQuery("{ListId} = @favID", LazyLoad = false)]
        Lists Lists
        {
            get;
        }
    }

    public interface Msg : Entity
    {
        [PrimaryKey]
        int ID { get; }
        [SqlType("nvarchar(100)")]
        string Msg_Title { get; set; }
        [SqlType("nvarchar(300)")]
        string Msg_Content { get; set; }
        [SqlType("nvarchar(50)")]
        string From_userName { get; set; }
        [SqlType("nvarchar(50)")]
        string To_userName { get; set; }
        DateTime Msg_DateTime { get; set; }
        bool IsRead { get; set; }
        bool FromIsDel { get; set; }
        bool ToIsDel { get; set; }
    }

    public interface Catalog : Entity
    {
        [PrimaryKey]
        int id { get; }
        [SqlType("nvarchar(20)")]
        string Name { get; set; }
        bool Show { get; set; }
    }

    public interface Class : Entity
    {
        [PrimaryKey]
        int id { get; }
        [SqlType("nvarchar(20)")]
        string Name { get; set; }
        int Catalogid { get; set;  }
    }
    //public interface ProjectDb : Entity
    //{
        //[PrimaryKey]
        //int ID { get; }
        //[SqlType("nvarchar(100)")]
        //string Project_Title { get; set; }
        //[SqlType("nvarchar(300)")]
        //string Project_Desc { get; set; }
        //[SqlType("nvarchar(50)")]
        //string From_userName { get; set; }
        //[SqlType("nvarchar(50)")]
        //string To_userName { get; set; }
        //DateTime Msg_DateTime { get; set; }
        //bool IsRead { get; set; }
        //bool FromIsDel { get; set; }
        //bool ToIsDel { get; set; }
    //}
}