sharding/samples/Sample.BulkConsole/OrderVirtualRoute.cs

33 lines
856 B
C#
Raw Normal View History

2021-09-08 10:44:29 +08:00
using System;
using Sample.BulkConsole.Entities;
2021-10-28 17:08:51 +08:00
using ShardingCore.Core.EntityMetadatas;
2021-09-08 10:44:29 +08:00
using ShardingCore.Sharding.PaginationConfigurations;
using ShardingCore.VirtualRoutes.Days;
namespace Sample.BulkConsole
{
/*
* @Author: xjm
* @Description:
* @Date: 2021/9/7 21:16:47
* @Ver: 1.0
* @Email: 326308290@qq.com
*/
public class OrderVirtualRoute:AbstractSimpleShardingDayKeyDateTimeVirtualTableRoute<Order>
{
2021-10-28 17:08:51 +08:00
2021-09-08 10:44:29 +08:00
public override DateTime GetBeginTime()
{
return DateTime.Now.Date.AddDays(-3);
}
2021-11-18 13:29:58 +08:00
/// <summary>
/// 返回null表示不开启
/// </summary>
/// <returns></returns>
2021-09-08 10:44:29 +08:00
public override IPaginationConfiguration<Order> CreatePaginationConfiguration()
{
return new OrderPaginationConfiguration();
}
}
}