mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-04 04:48:01 +08:00
feat: ✨ cron表达式的自然语言表达 (#156)
Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
using CronExpressionDescriptor;
|
||||
using NetAdmin.Domain.Dto.Sys.User;
|
||||
using NetAdmin.Domain.Enums.Sys;
|
||||
using HttpMethods = NetAdmin.Domain.Enums.HttpMethods;
|
||||
using Options = CronExpressionDescriptor.Options;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
|
||||
@ -9,6 +11,13 @@ namespace NetAdmin.Domain.Dto.Sys.Job;
|
||||
/// </summary>
|
||||
public record QueryJobRsp : Sys_Job
|
||||
{
|
||||
/// <summary>
|
||||
/// Cron 表达式描述
|
||||
/// </summary>
|
||||
[JsonInclude]
|
||||
public string CronDescription =>
|
||||
ExpressionDescriptor.GetDescription(ExecutionCron, new Options { Locale = "zh-CN" });
|
||||
|
||||
/// <inheritdoc cref="Sys_Job.LastStatusCode" />
|
||||
[JsonInclude]
|
||||
public new virtual string LastStatusCode =>
|
||||
|
Reference in New Issue
Block a user