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

namespace PushPlatform.Data.Criteria
{
    public partial class CriteriaPushTag
    {
        
        public CriteriaPushTag()
        {
            TableName="PushTag";
            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 FieldPushsysProid = "PushsysProid";
        public const string MapPushsysProid = "PushSys_ProId";
        public const string FieldTagname = "Tagname";
        public const string MapTagname = "TagName";
        public const string FieldTagdesc = "Tagdesc";
        public const string MapTagdesc = "TagDesc";
        public const string FieldIsDeleted = "IsDeleted";
        public const string MapIsDeleted = "Is_Deleted";
        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";
        
        
        
        #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 LikePushsysProid { get; set; }
        List<System.String> _InPushsysProid;
        public List<System.String> InPushsysProid
        {
            get
            {
                if (_InPushsysProid == null) { _InPushsysProid = new List<System.String>(); }
                return _InPushsysProid;
            }
        }
        List<System.String> _NotPushsysProid;
        public List<System.String> NotPushsysProid
        {
            get
            {
                if (_NotPushsysProid == null) { _NotPushsysProid = new List<System.String>(); }
                return _NotPushsysProid;
            }
        }
        List<System.String> _OrEqPushsysProid;
        public List<System.String> OrEqPushsysProid
        {
            get
            {
                if (_OrEqPushsysProid == null) { _OrEqPushsysProid = new List<System.String>(); }
                return _OrEqPushsysProid;
            }
        }
        List<System.String> _OrLikePushsysProid;
        public List<System.String> OrLikePushsysProid
        {
            get
            {
                if (_OrLikePushsysProid == null) { _OrLikePushsysProid = new List<System.String>(); }
                return _OrLikePushsysProid;
            }
        }
        public System.String EqPushsysProid { get; set; }
        public System.String NePushsysProid { get; set; }
        public System.String EqIgPushsysProid { get; set; }
        public System.String LePushsysProid { get; set; }
        public System.String GePushsysProid { get; set; }
        public System.String LtPushsysProid { get; set; }
        public System.String GtPushsysProid { get; set; }
        public bool  NullPushsysProid { get; set; }
        public bool  NotNullPushsysProid { get; set; }
        public System.String LikeTagname { get; set; }
        List<System.String> _InTagname;
        public List<System.String> InTagname
        {
            get
            {
                if (_InTagname == null) { _InTagname = new List<System.String>(); }
                return _InTagname;
            }
        }
        List<System.String> _NotTagname;
        public List<System.String> NotTagname
        {
            get
            {
                if (_NotTagname == null) { _NotTagname = new List<System.String>(); }
                return _NotTagname;
            }
        }
        List<System.String> _OrEqTagname;
        public List<System.String> OrEqTagname
        {
            get
            {
                if (_OrEqTagname == null) { _OrEqTagname = new List<System.String>(); }
                return _OrEqTagname;
            }
        }
        List<System.String> _OrLikeTagname;
        public List<System.String> OrLikeTagname
        {
            get
            {
                if (_OrLikeTagname == null) { _OrLikeTagname = new List<System.String>(); }
                return _OrLikeTagname;
            }
        }
        public System.String EqTagname { get; set; }
        public System.String NeTagname { get; set; }
        public System.String EqIgTagname { get; set; }
        public System.String LeTagname { get; set; }
        public System.String GeTagname { get; set; }
        public System.String LtTagname { get; set; }
        public System.String GtTagname { get; set; }
        public bool  NullTagname { get; set; }
        public bool  NotNullTagname { get; set; }
        public System.String LikeTagdesc { get; set; }
        List<System.String> _InTagdesc;
        public List<System.String> InTagdesc
        {
            get
            {
                if (_InTagdesc == null) { _InTagdesc = new List<System.String>(); }
                return _InTagdesc;
            }
        }
        List<System.String> _NotTagdesc;
        public List<System.String> NotTagdesc
        {
            get
            {
                if (_NotTagdesc == null) { _NotTagdesc = new List<System.String>(); }
                return _NotTagdesc;
            }
        }
        List<System.String> _OrEqTagdesc;
        public List<System.String> OrEqTagdesc
        {
            get
            {
                if (_OrEqTagdesc == null) { _OrEqTagdesc = new List<System.String>(); }
                return _OrEqTagdesc;
            }
        }
        List<System.String> _OrLikeTagdesc;
        public List<System.String> OrLikeTagdesc
        {
            get
            {
                if (_OrLikeTagdesc == null) { _OrLikeTagdesc = new List<System.String>(); }
                return _OrLikeTagdesc;
            }
        }
        public System.String EqTagdesc { get; set; }
        public System.String NeTagdesc { get; set; }
        public System.String EqIgTagdesc { get; set; }
        public System.String LeTagdesc { get; set; }
        public System.String GeTagdesc { get; set; }
        public System.String LtTagdesc { get; set; }
        public System.String GtTagdesc { get; set; }
        public bool  NullTagdesc { get; set; }
        public bool  NotNullTagdesc { get; set; }
        public System.UInt16? EqIsDeleted { get; set; }
        public System.UInt16? NeIsDeleted { get; set; }
        public System.UInt16? EqIgIsDeleted { get; set; }
        public System.UInt16? LeIsDeleted { get; set; }
        public System.UInt16? GeIsDeleted { get; set; }
        public System.UInt16? LtIsDeleted { get; set; }
        public System.UInt16? GtIsDeleted { get; set; }
        public bool  NullIsDeleted { get; set; }
        public bool  NotNullIsDeleted { 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; }
        
        
        
        #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
       
    }
}
