2021-10-29 10:44:48 +08:00
|
|
|
using ShardingCore.Core.EntityMetadatas;
|
2021-11-26 14:55:59 +08:00
|
|
|
using ShardingCore.Test.Domain.Entities;
|
2021-01-27 13:38:30 +08:00
|
|
|
using ShardingCore.VirtualRoutes.Mods;
|
2021-01-26 10:30:04 +08:00
|
|
|
|
2021-11-26 14:55:59 +08:00
|
|
|
namespace ShardingCore.Test.Shardings
|
2021-01-26 10:30:04 +08:00
|
|
|
{
|
2021-09-22 17:29:59 +08:00
|
|
|
/*
|
|
|
|
* @Author: xjm
|
|
|
|
* @Description:
|
|
|
|
* @Date: Thursday, 14 January 2021 15:39:27
|
|
|
|
* @Email: 326308290@qq.com
|
|
|
|
*/
|
2021-03-13 13:32:43 +08:00
|
|
|
public class SysUserModVirtualTableRoute : AbstractSimpleShardingModKeyStringVirtualTableRoute<SysUserMod>
|
2021-01-26 10:30:04 +08:00
|
|
|
{
|
2021-08-24 10:44:53 +08:00
|
|
|
protected override bool EnableHintRoute => true;
|
2022-06-01 09:50:43 +08:00
|
|
|
//public override bool? EnableRouteParseCompileCache => true;
|
2021-08-24 10:44:53 +08:00
|
|
|
|
2021-03-13 13:32:43 +08:00
|
|
|
public SysUserModVirtualTableRoute() : base(2,3)
|
2021-01-26 10:30:04 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-10-29 10:44:48 +08:00
|
|
|
public override void Configure(EntityMetadataTableBuilder<SysUserMod> builder)
|
|
|
|
{
|
|
|
|
builder.ShardingProperty(o => o.Id);
|
|
|
|
builder.TableSeparator("_");
|
|
|
|
}
|
2021-01-26 10:30:04 +08:00
|
|
|
}
|
|
|
|
}
|