@@ -11,6 +11,9 @@ public class CrontabItemDocument : MongoBase
1111 public string Cron { get ; set ; }
1212 public string Title { get ; set ; }
1313 public string Description { get ; set ; }
14+ public int ExecutionCount { get ; set ; }
15+ public int MaxExecutionCount { get ; set ; }
16+ public int ExpireSeconds { get ; set ; }
1417 public IEnumerable < CronTaskMongoElement > Tasks { get ; set ; } = [ ] ;
1518 public DateTime CreatedTime { get ; set ; } = DateTime . UtcNow ;
1619
@@ -25,6 +28,9 @@ public static CrontabItem ToDomainModel(CrontabItemDocument item)
2528 Cron = item . Cron ,
2629 Title = item . Title ,
2730 Description = item . Description ,
31+ ExecutionCount = item . ExecutionCount ,
32+ MaxExecutionCount = item . MaxExecutionCount ,
33+ ExpireSeconds = item . ExpireSeconds ,
2834 Tasks = item . Tasks ? . Select ( x => CronTaskMongoElement . ToDomainElement ( x ) ) ? . ToArray ( ) ?? [ ] ,
2935 CreatedTime = item . CreatedTime
3036 } ;
@@ -41,6 +47,9 @@ public static CrontabItemDocument ToMongoModel(CrontabItem item)
4147 Cron = item . Cron ,
4248 Title = item . Title ,
4349 Description = item . Description ,
50+ ExecutionCount = item . ExecutionCount ,
51+ MaxExecutionCount = item . MaxExecutionCount ,
52+ ExpireSeconds = item . ExpireSeconds ,
4453 Tasks = item . Tasks ? . Select ( x => CronTaskMongoElement . ToMongoElement ( x ) ) ? . ToList ( ) ?? [ ] ,
4554 CreatedTime = item . CreatedTime
4655 } ;
0 commit comments