2021-11-27 21:41:45 +08:00
|
|
|
|
using System;
|
|
|
|
|
using ShardingCore.Core.EntityMetadatas;
|
|
|
|
|
using ShardingCore.Test2x.Domain.Entities;
|
|
|
|
|
using ShardingCore.VirtualRoutes.Months;
|
|
|
|
|
|
|
|
|
|
namespace ShardingCore.Test2x.Shardings
|
|
|
|
|
{
|
|
|
|
|
public class LogMonthLongvirtualRoute:AbstractSimpleShardingMonthKeyLongVirtualTableRoute<LogMonthLong>
|
|
|
|
|
{
|
|
|
|
|
protected override bool EnableHintRoute => true;
|
2021-12-24 15:23:55 +08:00
|
|
|
|
public override bool? EnableRouteParseCompileCache => true;
|
2021-11-27 21:41:45 +08:00
|
|
|
|
|
|
|
|
|
public override bool AutoCreateTableByTime()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override DateTime GetBeginTime()
|
|
|
|
|
{
|
|
|
|
|
return new DateTime(2021, 1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Configure(EntityMetadataTableBuilder<LogMonthLong> builder)
|
|
|
|
|
{
|
|
|
|
|
builder.ShardingProperty(o => o.LogTime);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|