Skip to content

Commit 80aa729

Browse files
authored
Merge pull request #835 from iceljc/master
add data
2 parents 5b47e68 + a412d33 commit 80aa729

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Plugins/BotSharp.Plugin.MongoStorage/Collections/CrontabItemDocument.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class CrontabItemDocument : MongoBase
1414
public int ExecutionCount { get; set; }
1515
public int MaxExecutionCount { get; set; }
1616
public int ExpireSeconds { get; set; }
17+
public DateTime? LastExecutionTime { get; set; }
18+
public bool LessThan60Seconds { get; set; } = false;
1719
public IEnumerable<CronTaskMongoElement> Tasks { get; set; } = [];
1820
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
1921

@@ -31,6 +33,8 @@ public static CrontabItem ToDomainModel(CrontabItemDocument item)
3133
ExecutionCount = item.ExecutionCount,
3234
MaxExecutionCount = item.MaxExecutionCount,
3335
ExpireSeconds = item.ExpireSeconds,
36+
LastExecutionTime = item.LastExecutionTime,
37+
LessThan60Seconds = item.LessThan60Seconds,
3438
Tasks = item.Tasks?.Select(x => CronTaskMongoElement.ToDomainElement(x))?.ToArray() ?? [],
3539
CreatedTime = item.CreatedTime
3640
};
@@ -50,6 +54,8 @@ public static CrontabItemDocument ToMongoModel(CrontabItem item)
5054
ExecutionCount = item.ExecutionCount,
5155
MaxExecutionCount = item.MaxExecutionCount,
5256
ExpireSeconds = item.ExpireSeconds,
57+
LastExecutionTime = item.LastExecutionTime,
58+
LessThan60Seconds = item.LessThan60Seconds,
5359
Tasks = item.Tasks?.Select(x => CronTaskMongoElement.ToMongoElement(x))?.ToList() ?? [],
5460
CreatedTime = item.CreatedTime
5561
};

0 commit comments

Comments
 (0)