-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: tk <fiyne1a@dingtalk.com>
- Loading branch information
Showing
17 changed files
with
285 additions
and
137 deletions.
There are no files selected for viewing
File renamed without changes.
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
14 changes: 14 additions & 0 deletions
14
src/backend/NetAdmin.Domain/Attributes/IndicatorAttribute.cs
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,14 @@ | ||
namespace NetAdmin.Domain.Attributes; | ||
|
||
/// <summary> | ||
/// 标记一个枚举的状态指示 | ||
/// </summary> | ||
/// <inheritdoc /> | ||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Enum)] | ||
public sealed class IndicatorAttribute(string indicate) : Attribute | ||
{ | ||
/// <summary> | ||
/// 状态指示 | ||
/// </summary> | ||
public string Indicate { get; init; } = indicate; | ||
} |
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,41 @@ | ||
namespace NetAdmin.Infrastructure.Enums; | ||
|
||
/// <summary> | ||
/// 状态表示 | ||
/// </summary> | ||
[Export] | ||
public enum Indicates | ||
{ | ||
/// <summary> | ||
/// 信息 | ||
/// </summary> | ||
Info = 1 | ||
|
||
, | ||
|
||
/// <summary> | ||
/// 主要 | ||
/// </summary> | ||
Primary = 2 | ||
|
||
, | ||
|
||
/// <summary> | ||
/// 警告 | ||
/// </summary> | ||
Warning = 3 | ||
|
||
, | ||
|
||
/// <summary> | ||
/// 成功 | ||
/// </summary> | ||
Success = 4 | ||
|
||
, | ||
|
||
/// <summary> | ||
/// 危险 | ||
/// </summary> | ||
Danger = 5 | ||
} |
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.