using System;
using System.Collections.Generic;
using System.Linq;

namespace PushPlatform.Data.Criteria
{
    public partial class CriteriaSysMenu
    {
        
        public CriteriaSysMenu()
        {
            TableName="SysMenu";
            OrderList = new List<string>();
            PageIndex = 1;
            PageSize = 20;
            UsePage = true;
            UserWhere = false;
        }
        
        #region Criteria Property
        public string TableName { get; set; }
        
        public IList<string> OrderList { get; set; }
        
        public int PageIndex { get; set; }
        
        public int PageSize { get; set; }
        
        public int PageTotal { get; set; }
        
        public bool UsePage { get; set; }
        
        public bool UseOr { get; set; }
        
        public bool UserWhere { get; set; }
        
        public string Where { get; set; }
        
        public bool IsAsc { get; set; }
        
        public object WhereValue { get; set; }
        
        #endregion
    
        #region Criteria Field
        
        
        public const string CriteriaField = "Id";
        
        
        
        public const string FieldId = "Id";
        public const string MapId = "Id";
        public const string FieldParentId = "ParentId";
        public const string MapParentId = "Parent_Id";
        public const string FieldMenuName = "MenuName";
        public const string MapMenuName = "Menu_Name";
        public const string FieldMenuUrl = "MenuUrl";
        public const string MapMenuUrl = "Menu_Url";
        public const string FieldMenuSort = "MenuSort";
        public const string MapMenuSort = "Menu_Sort";
        public const string FieldCreateUser = "CreateUser";
        public const string MapCreateUser = "Create_User";
        public const string FieldCreateTime = "CreateTime";
        public const string MapCreateTime = "Create_Time";
        public const string FieldUpdateUser = "UpdateUser";
        public const string MapUpdateUser = "Update_User";
        public const string FieldUpdateTime = "UpdateTime";
        public const string MapUpdateTime = "Update_Time";
        public const string FieldIsDeleted = "IsDeleted";
        public const string MapIsDeleted = "Is_Deleted";
        public const string FieldTimestamp = "Timestamp";
        public const string MapTimestamp = "Timestamp";
        
        
        
        #endregion
        
        #region Criteria Auto Property
        
        public System.String LikeAll { get; set; }
        
        public System.String LikeId { get; set; }
        List<System.String> _InId;
        public List<System.String> InId
        {
            get
            {
                if (_InId == null) { _InId = new List<System.String>(); }
                return _InId;
            }
        }
        List<System.String> _NotId;
        public List<System.String> NotId
        {
            get
            {
                if (_NotId == null) { _NotId = new List<System.String>(); }
                return _NotId;
            }
        }
        List<System.String> _OrEqId;
        public List<System.String> OrEqId
        {
            get
            {
                if (_OrEqId == null) { _OrEqId = new List<System.String>(); }
                return _OrEqId;
            }
        }
        List<System.String> _OrLikeId;
        public List<System.String> OrLikeId
        {
            get
            {
                if (_OrLikeId == null) { _OrLikeId = new List<System.String>(); }
                return _OrLikeId;
            }
        }
        public System.String EqId { get; set; }
        public System.String NeId { get; set; }
        public System.String EqIgId { get; set; }
        public System.String LeId { get; set; }
        public System.String GeId { get; set; }
        public System.String LtId { get; set; }
        public System.String GtId { get; set; }
        public bool  NullId { get; set; }
        public bool  NotNullId { get; set; }
        public System.String LikeParentId { get; set; }
        List<System.String> _InParentId;
        public List<System.String> InParentId
        {
            get
            {
                if (_InParentId == null) { _InParentId = new List<System.String>(); }
                return _InParentId;
            }
        }
        List<System.String> _NotParentId;
        public List<System.String> NotParentId
        {
            get
            {
                if (_NotParentId == null) { _NotParentId = new List<System.String>(); }
                return _NotParentId;
            }
        }
        List<System.String> _OrEqParentId;
        public List<System.String> OrEqParentId
        {
            get
            {
                if (_OrEqParentId == null) { _OrEqParentId = new List<System.String>(); }
                return _OrEqParentId;
            }
        }
        List<System.String> _OrLikeParentId;
        public List<System.String> OrLikeParentId
        {
            get
            {
                if (_OrLikeParentId == null) { _OrLikeParentId = new List<System.String>(); }
                return _OrLikeParentId;
            }
        }
        public System.String EqParentId { get; set; }
        public System.String NeParentId { get; set; }
        public System.String EqIgParentId { get; set; }
        public System.String LeParentId { get; set; }
        public System.String GeParentId { get; set; }
        public System.String LtParentId { get; set; }
        public System.String GtParentId { get; set; }
        public bool  NullParentId { get; set; }
        public bool  NotNullParentId { get; set; }
        public System.String LikeMenuName { get; set; }
        List<System.String> _InMenuName;
        public List<System.String> InMenuName
        {
            get
            {
                if (_InMenuName == null) { _InMenuName = new List<System.String>(); }
                return _InMenuName;
            }
        }
        List<System.String> _NotMenuName;
        public List<System.String> NotMenuName
        {
            get
            {
                if (_NotMenuName == null) { _NotMenuName = new List<System.String>(); }
                return _NotMenuName;
            }
        }
        List<System.String> _OrEqMenuName;
        public List<System.String> OrEqMenuName
        {
            get
            {
                if (_OrEqMenuName == null) { _OrEqMenuName = new List<System.String>(); }
                return _OrEqMenuName;
            }
        }
        List<System.String> _OrLikeMenuName;
        public List<System.String> OrLikeMenuName
        {
            get
            {
                if (_OrLikeMenuName == null) { _OrLikeMenuName = new List<System.String>(); }
                return _OrLikeMenuName;
            }
        }
        public System.String EqMenuName { get; set; }
        public System.String NeMenuName { get; set; }
        public System.String EqIgMenuName { get; set; }
        public System.String LeMenuName { get; set; }
        public System.String GeMenuName { get; set; }
        public System.String LtMenuName { get; set; }
        public System.String GtMenuName { get; set; }
        public bool  NullMenuName { get; set; }
        public bool  NotNullMenuName { get; set; }
        public System.String LikeMenuUrl { get; set; }
        List<System.String> _InMenuUrl;
        public List<System.String> InMenuUrl
        {
            get
            {
                if (_InMenuUrl == null) { _InMenuUrl = new List<System.String>(); }
                return _InMenuUrl;
            }
        }
        List<System.String> _NotMenuUrl;
        public List<System.String> NotMenuUrl
        {
            get
            {
                if (_NotMenuUrl == null) { _NotMenuUrl = new List<System.String>(); }
                return _NotMenuUrl;
            }
        }
        List<System.String> _OrEqMenuUrl;
        public List<System.String> OrEqMenuUrl
        {
            get
            {
                if (_OrEqMenuUrl == null) { _OrEqMenuUrl = new List<System.String>(); }
                return _OrEqMenuUrl;
            }
        }
        List<System.String> _OrLikeMenuUrl;
        public List<System.String> OrLikeMenuUrl
        {
            get
            {
                if (_OrLikeMenuUrl == null) { _OrLikeMenuUrl = new List<System.String>(); }
                return _OrLikeMenuUrl;
            }
        }
        public System.String EqMenuUrl { get; set; }
        public System.String NeMenuUrl { get; set; }
        public System.String EqIgMenuUrl { get; set; }
        public System.String LeMenuUrl { get; set; }
        public System.String GeMenuUrl { get; set; }
        public System.String LtMenuUrl { get; set; }
        public System.String GtMenuUrl { get; set; }
        public bool  NullMenuUrl { get; set; }
        public bool  NotNullMenuUrl { get; set; }
        List<System.Int32> _InMenuSort;
        public List<System.Int32> InMenuSort
        {
            get
            {
                if (_InMenuSort == null) { _InMenuSort = new List<System.Int32>(); }
                return _InMenuSort;
            }
        }
        List<System.Int32> _NotMenuSort;
        public List<System.Int32> NotMenuSort
        {
            get
            {
                if (_NotMenuSort == null) { _NotMenuSort = new List<System.Int32>(); }
                return _NotMenuSort;
            }
        }
        List<System.Int32> _OrEqMenuSort;
        public List<System.Int32> OrEqMenuSort
        {
            get
            {
                if (_OrEqMenuSort == null) { _OrEqMenuSort = new List<System.Int32>(); }
                return _OrEqMenuSort;
            }
        }
        public System.Int32? EqMenuSort { get; set; }
        public System.Int32? NeMenuSort { get; set; }
        public System.Int32? EqIgMenuSort { get; set; }
        public System.Int32? LeMenuSort { get; set; }
        public System.Int32? GeMenuSort { get; set; }
        public System.Int32? LtMenuSort { get; set; }
        public System.Int32? GtMenuSort { get; set; }
        public bool  NullMenuSort { get; set; }
        public bool  NotNullMenuSort { get; set; }
        public System.String LikeCreateUser { get; set; }
        List<System.String> _InCreateUser;
        public List<System.String> InCreateUser
        {
            get
            {
                if (_InCreateUser == null) { _InCreateUser = new List<System.String>(); }
                return _InCreateUser;
            }
        }
        List<System.String> _NotCreateUser;
        public List<System.String> NotCreateUser
        {
            get
            {
                if (_NotCreateUser == null) { _NotCreateUser = new List<System.String>(); }
                return _NotCreateUser;
            }
        }
        List<System.String> _OrEqCreateUser;
        public List<System.String> OrEqCreateUser
        {
            get
            {
                if (_OrEqCreateUser == null) { _OrEqCreateUser = new List<System.String>(); }
                return _OrEqCreateUser;
            }
        }
        List<System.String> _OrLikeCreateUser;
        public List<System.String> OrLikeCreateUser
        {
            get
            {
                if (_OrLikeCreateUser == null) { _OrLikeCreateUser = new List<System.String>(); }
                return _OrLikeCreateUser;
            }
        }
        public System.String EqCreateUser { get; set; }
        public System.String NeCreateUser { get; set; }
        public System.String EqIgCreateUser { get; set; }
        public System.String LeCreateUser { get; set; }
        public System.String GeCreateUser { get; set; }
        public System.String LtCreateUser { get; set; }
        public System.String GtCreateUser { get; set; }
        public bool  NullCreateUser { get; set; }
        public bool  NotNullCreateUser { get; set; }
        public System.DateTime? EqCreateTime { get; set; }
        public System.DateTime? NeCreateTime { get; set; }
        public System.DateTime? EqIgCreateTime { get; set; }
        public System.DateTime? LeCreateTime { get; set; }
        public System.DateTime? GeCreateTime { get; set; }
        public System.DateTime? LtCreateTime { get; set; }
        public System.DateTime? GtCreateTime { get; set; }
        public bool  NullCreateTime { get; set; }
        public bool  NotNullCreateTime { get; set; }
        public System.String LikeUpdateUser { get; set; }
        List<System.String> _InUpdateUser;
        public List<System.String> InUpdateUser
        {
            get
            {
                if (_InUpdateUser == null) { _InUpdateUser = new List<System.String>(); }
                return _InUpdateUser;
            }
        }
        List<System.String> _NotUpdateUser;
        public List<System.String> NotUpdateUser
        {
            get
            {
                if (_NotUpdateUser == null) { _NotUpdateUser = new List<System.String>(); }
                return _NotUpdateUser;
            }
        }
        List<System.String> _OrEqUpdateUser;
        public List<System.String> OrEqUpdateUser
        {
            get
            {
                if (_OrEqUpdateUser == null) { _OrEqUpdateUser = new List<System.String>(); }
                return _OrEqUpdateUser;
            }
        }
        List<System.String> _OrLikeUpdateUser;
        public List<System.String> OrLikeUpdateUser
        {
            get
            {
                if (_OrLikeUpdateUser == null) { _OrLikeUpdateUser = new List<System.String>(); }
                return _OrLikeUpdateUser;
            }
        }
        public System.String EqUpdateUser { get; set; }
        public System.String NeUpdateUser { get; set; }
        public System.String EqIgUpdateUser { get; set; }
        public System.String LeUpdateUser { get; set; }
        public System.String GeUpdateUser { get; set; }
        public System.String LtUpdateUser { get; set; }
        public System.String GtUpdateUser { get; set; }
        public bool  NullUpdateUser { get; set; }
        public bool  NotNullUpdateUser { get; set; }
        public System.DateTime? EqUpdateTime { get; set; }
        public System.DateTime? NeUpdateTime { get; set; }
        public System.DateTime? EqIgUpdateTime { get; set; }
        public System.DateTime? LeUpdateTime { get; set; }
        public System.DateTime? GeUpdateTime { get; set; }
        public System.DateTime? LtUpdateTime { get; set; }
        public System.DateTime? GtUpdateTime { get; set; }
        public bool  NullUpdateTime { get; set; }
        public bool  NotNullUpdateTime { get; set; }
        public System.SByte? EqIsDeleted { get; set; }
        public System.SByte? NeIsDeleted { get; set; }
        public System.SByte? EqIgIsDeleted { get; set; }
        public System.SByte? LeIsDeleted { get; set; }
        public System.SByte? GeIsDeleted { get; set; }
        public System.SByte? LtIsDeleted { get; set; }
        public System.SByte? GtIsDeleted { get; set; }
        public bool  NullIsDeleted { get; set; }
        public bool  NotNullIsDeleted { get; set; }
        public System.Int64? EqTimestamp { get; set; }
        public System.Int64? NeTimestamp { get; set; }
        public System.Int64? EqIgTimestamp { get; set; }
        public System.Int64? LeTimestamp { get; set; }
        public System.Int64? GeTimestamp { get; set; }
        public System.Int64? LtTimestamp { get; set; }
        public System.Int64? GtTimestamp { get; set; }
        public bool  NullTimestamp { get; set; }
        public bool  NotNullTimestamp { get; set; }
        
        
        
        #endregion
        
        
        #region Criteria Method
        
        public void AddOrder(string order)
        {
            this.AddOrder(order,false);
        }
        
        public void AddOrder(string order, bool isAsc)
        {
            if(isAsc)
            {
                this.OrderList.Add(order);
                IsAsc=true;
            }
            else
            {
                this.OrderList.Add(order);
                IsAsc=false;
            }
        }
        
        public void ClearOrder()
        {
            this.OrderList.Clear();
        }
        
        public void RemoveOrder(string order)
        {
            if(this.OrderList.Contains(order+",0"))
                this.OrderList.Remove(order+",0");
            if(this.OrderList.Contains(order+",1"))
                this.OrderList.Remove(order+",1");
        }
        
        #endregion
       
    }
}
