6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
71 lines
2.0 KiB
C#
71 lines
2.0 KiB
C#
using System;
|
||
|
||
namespace DBEntitys
|
||
{
|
||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||
public class DBFieldNameAttribute : Attribute
|
||
{
|
||
/// <summary>
|
||
/// 别名
|
||
/// </summary>
|
||
public string FieldName { get; }
|
||
|
||
/// <summary>
|
||
/// 构造函数
|
||
/// </summary>
|
||
public DBFieldNameAttribute(string fieldName = "")
|
||
{
|
||
FieldName = fieldName;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 标记实体属性为时间区间字段
|
||
/// 使用此注解的属性在查询时会自动使用 WhereBetween
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||
public class DateRangeFieldAttribute : Attribute
|
||
{
|
||
/// <summary>
|
||
/// 是否为时间区间字段
|
||
/// </summary>
|
||
public bool IsDateRange { get; }
|
||
|
||
/// <summary>
|
||
/// 构造函数
|
||
/// </summary>
|
||
/// <param name="isDateRange">默认为true,标记为时间区间字段</param>
|
||
public DateRangeFieldAttribute(bool isDateRange = true)
|
||
{
|
||
IsDateRange = isDateRange;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 标记实体属性在查询时忽略此字段
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||
public class QueryIgnoreAttribute : Attribute
|
||
{
|
||
}
|
||
|
||
/// <summary>
|
||
/// 标记实体属性使用 LIKE 查询
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||
public class LikeFieldAttribute : Attribute
|
||
{
|
||
}
|
||
|
||
/// <summary>
|
||
/// 标记实体属性使用 IN 查询(字段值为逗号分隔的多个值)
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||
public class InFieldAttribute : Attribute
|
||
{
|
||
/// <summary>
|
||
/// 分隔符,默认为逗号
|
||
/// </summary>
|
||
public char Separator { get; set; } = ',';
|
||
}
|
||
} |