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

namespace PushPlatform.Data.Criteria
{
    public partial class CriteriaSysSendCfg
    {
        
        public CriteriaSysSendCfg()
        {
            TableName="SysSendCfg";
            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 FieldConfigInfo = "ConfigInfo";
        public const string MapConfigInfo = "Config_Info";
        public const string FieldOriginalid = "Originalid";
        public const string MapOriginalid = "OriginalId";
        public const string FieldProjectid = "Projectid";
        public const string MapProjectid = "ProjectId";
        public const string FieldType = "Type";
        public const string MapType = "Type";
        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 LikeConfigInfo { get; set; }
        List<System.String> _InConfigInfo;
        public List<System.String> InConfigInfo
        {
            get
            {
                if (_InConfigInfo == null) { _InConfigInfo = new List<System.String>(); }
                return _InConfigInfo;
            }
        }
        List<System.String> _NotConfigInfo;
        public List<System.String> NotConfigInfo
        {
            get
            {
                if (_NotConfigInfo == null) { _NotConfigInfo = new List<System.String>(); }
                return _NotConfigInfo;
            }
        }
        List<System.String> _OrEqConfigInfo;
        public List<System.String> OrEqConfigInfo
        {
            get
            {
                if (_OrEqConfigInfo == null) { _OrEqConfigInfo = new List<System.String>(); }
                return _OrEqConfigInfo;
            }
        }
        List<System.String> _OrLikeConfigInfo;
        public List<System.String> OrLikeConfigInfo
        {
            get
            {
                if (_OrLikeConfigInfo == null) { _OrLikeConfigInfo = new List<System.String>(); }
                return _OrLikeConfigInfo;
            }
        }
        public System.String EqConfigInfo { get; set; }
        public System.String NeConfigInfo { get; set; }
        public System.String EqIgConfigInfo { get; set; }
        public System.String LeConfigInfo { get; set; }
        public System.String GeConfigInfo { get; set; }
        public System.String LtConfigInfo { get; set; }
        public System.String GtConfigInfo { get; set; }
        public bool  NullConfigInfo { get; set; }
        public bool  NotNullConfigInfo { get; set; }
        public System.String LikeOriginalid { get; set; }
        List<System.String> _InOriginalid;
        public List<System.String> InOriginalid
        {
            get
            {
                if (_InOriginalid == null) { _InOriginalid = new List<System.String>(); }
                return _InOriginalid;
            }
        }
        List<System.String> _NotOriginalid;
        public List<System.String> NotOriginalid
        {
            get
            {
                if (_NotOriginalid == null) { _NotOriginalid = new List<System.String>(); }
                return _NotOriginalid;
            }
        }
        List<System.String> _OrEqOriginalid;
        public List<System.String> OrEqOriginalid
        {
            get
            {
                if (_OrEqOriginalid == null) { _OrEqOriginalid = new List<System.String>(); }
                return _OrEqOriginalid;
            }
        }
        List<System.String> _OrLikeOriginalid;
        public List<System.String> OrLikeOriginalid
        {
            get
            {
                if (_OrLikeOriginalid == null) { _OrLikeOriginalid = new List<System.String>(); }
                return _OrLikeOriginalid;
            }
        }
        public System.String EqOriginalid { get; set; }
        public System.String NeOriginalid { get; set; }
        public System.String EqIgOriginalid { get; set; }
        public System.String LeOriginalid { get; set; }
        public System.String GeOriginalid { get; set; }
        public System.String LtOriginalid { get; set; }
        public System.String GtOriginalid { get; set; }
        public bool  NullOriginalid { get; set; }
        public bool  NotNullOriginalid { get; set; }
        public System.String LikeProjectid { get; set; }
        List<System.String> _InProjectid;
        public List<System.String> InProjectid
        {
            get
            {
                if (_InProjectid == null) { _InProjectid = new List<System.String>(); }
                return _InProjectid;
            }
        }
        List<System.String> _NotProjectid;
        public List<System.String> NotProjectid
        {
            get
            {
                if (_NotProjectid == null) { _NotProjectid = new List<System.String>(); }
                return _NotProjectid;
            }
        }
        List<System.String> _OrEqProjectid;
        public List<System.String> OrEqProjectid
        {
            get
            {
                if (_OrEqProjectid == null) { _OrEqProjectid = new List<System.String>(); }
                return _OrEqProjectid;
            }
        }
        List<System.String> _OrLikeProjectid;
        public List<System.String> OrLikeProjectid
        {
            get
            {
                if (_OrLikeProjectid == null) { _OrLikeProjectid = new List<System.String>(); }
                return _OrLikeProjectid;
            }
        }
        public System.String EqProjectid { get; set; }
        public System.String NeProjectid { get; set; }
        public System.String EqIgProjectid { get; set; }
        public System.String LeProjectid { get; set; }
        public System.String GeProjectid { get; set; }
        public System.String LtProjectid { get; set; }
        public System.String GtProjectid { get; set; }
        public bool  NullProjectid { get; set; }
        public bool  NotNullProjectid { get; set; }
        List<System.Int32> _InType;
        public List<System.Int32> InType
        {
            get
            {
                if (_InType == null) { _InType = new List<System.Int32>(); }
                return _InType;
            }
        }
        List<System.Int32> _NotType;
        public List<System.Int32> NotType
        {
            get
            {
                if (_NotType == null) { _NotType = new List<System.Int32>(); }
                return _NotType;
            }
        }
        List<System.Int32> _OrEqType;
        public List<System.Int32> OrEqType
        {
            get
            {
                if (_OrEqType == null) { _OrEqType = new List<System.Int32>(); }
                return _OrEqType;
            }
        }
        public System.Int32? EqType { get; set; }
        public System.Int32? NeType { get; set; }
        public System.Int32? EqIgType { get; set; }
        public System.Int32? LeType { get; set; }
        public System.Int32? GeType { get; set; }
        public System.Int32? LtType { get; set; }
        public System.Int32? GtType { get; set; }
        public bool  NullType { get; set; }
        public bool  NotNullType { 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
       
    }
}
