using System.ComponentModel.DataAnnotations.Schema;
namespace Znyc.Recruitment.Admin.Commons.Attributes
{
///
/// 数据库分表特性
///
public class ShardingTableAttribute : TableAttribute
{
///
///
///
public ShardingTableAttribute(string name) : base(name)
{
Suffix = "yyyyMMdd";
Splitter = "_";
}
///
///
///
///
///
public ShardingTableAttribute(string name, string splitter = "_", string suffix = "yyyyMMdd") : base(name)
{
Suffix = suffix;
}
///
/// 分隔符
///
public string Splitter { get; set; } = "_";
///
/// 分表后缀格式。默认值:_yyyyMMdd
///
public string Suffix { get; set; } = "yyyyMMdd";
}
}