using RG3.PF.Abstractions.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace RG3.PF.Abstractions.Entity
{
    /// <summary>
    /// 切片配置  2021-09-23 cbg
    /// </summary>
    public class ShredConfig:ShredBasis
    {

        /// <summary>
        /// 存储如  mkey 或者 mapperKey  ,  数据在 db.provider.shirding.json
        /// </summary>
        public string ShredKey { get; set; }

          /// <summary>
        /// shirding_resource_data_his.i_table_mysql
        /// </summary>
        public string ShredTableMKey { get; set; }

        /// <summary>
        /// shirding_resource_data_his.i_db_mysql
        /// </summary>
        public string ShredDbMKey { get; set; }

        /// <summary>
        /// 切片列   如时间列、自增列、数值列
        /// </summary>
        public string ShredColumn { get; set; }

        /// <summary>
        /// 主键列   自增列、雪花算法列
        /// </summary>
        public string ShredPrimary { get; set; }

         /// <summary>
        /// 切片数  表
        /// </summary>
        public int? ShredModTableNum { get; set; }

        /// <summary>
        /// 切片数  库
        /// </summary>
        public int? ShredModDbNum { get; set; }

       /// <summary>
        /// 切片规则 表   year  month  day   mod(求模)
        /// </summary>
        public ShredRule ShredTableRule { get; set; }


        /// <summary>
        /// 切片规则 库   year  month  day   mod(求模)
        /// </summary>
        public ShredRule ShredDbRule { get; set; }

        /// <summary>
        /// 切片类型   db-table     分库-分表     Unknown 不切片
        /// </summary>
        public ShredType ShredType { get; set; }


        /// <summary>
        /// 切片类型  Date  Snowflake Mod  Unknown 不切片
        /// </summary>
        public ShredMethod ShredMethod { get; set; }

          /// <summary>
        /// 分表 时间格式
        /// </summary>
        public string ShredTableFormat{ get; set; }
        /// <summary>
        /// 分库 时间格式
        /// </summary>
        public string ShredDbFormat { get; set; }

         /// <summary>
        /// 替换的sql语句  集合  key/value
        /// </summary>

        public IEnumerable<DataKeyValue> TableChars { get; set; } = new List<DataKeyValue>();

        /// <summary>
        /// 替换的sql语句  集合  key/value
        /// </summary>

        public IEnumerable<DataKeyValue> DbChars { get; set; } = new List<DataKeyValue>();


        /// <summary>
        /// 数据驱动  db.provider.json   "Oracle.ManagedDataAccess.Client"
        /// </summary>
        public string ProviderName { get; set; }


        /// <summary>
        /// 索引名称,如果没设置,默认使用 ownerId-moduleKey
        /// </summary>
        public string EsIndexName { get; set; }
        /// <summary>
        /// 索引类别
        /// </summary>
        public string EsIndexType { get; set; }
    }
}
文档更新时间: 2021-09-14 23:32   作者:admin