-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
请求日志自动分表 [skip ci] Co-authored-by: tk <[email protected]>
- Loading branch information
Showing
74 changed files
with
1,500 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,8 @@ | |
电子邮箱 | ||
男 | ||
登录 | ||
登录名 | ||
登录日志导出 | ||
硕士 | ||
示例导出 | ||
离异 | ||
|
@@ -123,6 +125,7 @@ | |
请求日志导出 | ||
调试 | ||
跟踪 | ||
跟踪标识 | ||
跟踪编号 | ||
身份证 | ||
运行 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
namespace NetAdmin.Domain.DbMaps.Sys; | ||
|
||
/// <summary> | ||
/// 登录日志表 | ||
/// </summary> | ||
[SqlIndex(Chars.FLG_DB_INDEX_PREFIX + nameof(CreatedTime), $"{nameof(CreatedTime)} DESC", false)] | ||
[SqlIndex(Chars.FLG_DB_INDEX_PREFIX + nameof(HttpStatusCode), nameof(HttpStatusCode), false)] | ||
[SqlIndex(Chars.FLG_DB_INDEX_PREFIX + nameof(OwnerId), nameof(OwnerId), false)] | ||
[Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_LoginLog))] | ||
public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFieldCreatedClientIp | ||
, IFieldCreatedClientUserAgent | ||
{ | ||
/// <inheritdoc /> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual int? CreatedClientIp { get; init; } | ||
|
||
/// <inheritdoc /> | ||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual DateTime CreatedTime { get; init; } | ||
|
||
/// <inheritdoc /> | ||
#if DBTYPE_SQLSERVER | ||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_1022)] | ||
#else | ||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||
#endif | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string CreatedUserAgent { get; init; } | ||
|
||
/// <summary> | ||
/// 执行耗时(毫秒) | ||
/// </summary> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual int Duration { get; init; } | ||
|
||
/// <summary> | ||
/// 程序响应码 | ||
/// </summary> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual ErrorCodes ErrorCode { get; init; } | ||
|
||
/// <summary> | ||
/// HTTP状态码 | ||
/// </summary> | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_SMALL_INT)] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual int HttpStatusCode { get; init; } | ||
|
||
/// <summary> | ||
/// 登录用户名 | ||
/// </summary> | ||
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string LoginUserName { get; init; } | ||
|
||
/// <summary> | ||
/// 拥有者 | ||
/// </summary> | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
[Navigate(nameof(OwnerId))] | ||
public Sys_User Owner { get; init; } | ||
|
||
/// <inheritdoc /> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual long? OwnerDeptId { get; init; } | ||
|
||
/// <inheritdoc /> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual long? OwnerId { get; init; } | ||
|
||
/// <summary> | ||
/// 请求内容 | ||
/// </summary> | ||
#if DBTYPE_SQLSERVER | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||
#else | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||
#endif | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string RequestBody { get; init; } | ||
|
||
/// <summary> | ||
/// 请求头信息 | ||
/// </summary> | ||
#if DBTYPE_SQLSERVER | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||
#else | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||
#endif | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string RequestHeaders { get; init; } | ||
|
||
/// <summary> | ||
/// 请求地址 | ||
/// </summary> | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string RequestUrl { get; init; } | ||
|
||
/// <summary> | ||
/// 响应内容 | ||
/// </summary> | ||
#if DBTYPE_SQLSERVER | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||
#else | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||
#endif | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string ResponseBody { get; init; } | ||
|
||
/// <summary> | ||
/// 响应头 | ||
/// </summary> | ||
#if DBTYPE_SQLSERVER | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||
#else | ||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||
#endif | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual string ResponseHeaders { get; init; } | ||
|
||
/// <summary> | ||
/// 服务器IP | ||
/// </summary> | ||
[Column] | ||
[CsvIgnore] | ||
[JsonIgnore] | ||
public virtual int? ServerIp { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.