@@ -11,6 +11,9 @@ public class CrontabItemDocument : MongoBase
11
11
public string Cron { get ; set ; }
12
12
public string Title { get ; set ; }
13
13
public string Description { get ; set ; }
14
+ public int ExecutionCount { get ; set ; }
15
+ public int MaxExecutionCount { get ; set ; }
16
+ public int ExpireSeconds { get ; set ; }
14
17
public IEnumerable < CronTaskMongoElement > Tasks { get ; set ; } = [ ] ;
15
18
public DateTime CreatedTime { get ; set ; } = DateTime . UtcNow ;
16
19
@@ -25,6 +28,9 @@ public static CrontabItem ToDomainModel(CrontabItemDocument item)
25
28
Cron = item . Cron ,
26
29
Title = item . Title ,
27
30
Description = item . Description ,
31
+ ExecutionCount = item . ExecutionCount ,
32
+ MaxExecutionCount = item . MaxExecutionCount ,
33
+ ExpireSeconds = item . ExpireSeconds ,
28
34
Tasks = item . Tasks ? . Select ( x => CronTaskMongoElement . ToDomainElement ( x ) ) ? . ToArray ( ) ?? [ ] ,
29
35
CreatedTime = item . CreatedTime
30
36
} ;
@@ -41,6 +47,9 @@ public static CrontabItemDocument ToMongoModel(CrontabItem item)
41
47
Cron = item . Cron ,
42
48
Title = item . Title ,
43
49
Description = item . Description ,
50
+ ExecutionCount = item . ExecutionCount ,
51
+ MaxExecutionCount = item . MaxExecutionCount ,
52
+ ExpireSeconds = item . ExpireSeconds ,
44
53
Tasks = item . Tasks ? . Select ( x => CronTaskMongoElement . ToMongoElement ( x ) ) ? . ToList ( ) ?? [ ] ,
45
54
CreatedTime = item . CreatedTime
46
55
} ;
0 commit comments