optimization update, web scheduler test-integration
This commit is contained in:
parent
3c9ccaafeb
commit
1591618c2c
103 changed files with 4826 additions and 1502 deletions
|
|
@ -0,0 +1,46 @@
|
|||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Driver;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Insight.Infrastructure.Entities;
|
||||
|
||||
public static partial class MongoDatabaseExtensions
|
||||
{
|
||||
public static IMongoCollection<TriggerEntity> Trigger(this IMongoDatabase database) => database.GetCollection<TriggerEntity>("trigger");
|
||||
}
|
||||
|
||||
public class TriggerEntity
|
||||
{
|
||||
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("insert")]
|
||||
public DateTime? Insert { get; set; }
|
||||
|
||||
[BsonElement("update")]
|
||||
public DateTime? Update { get; set; }
|
||||
|
||||
[BsonElement("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[BsonElement("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[BsonElement("mode")]
|
||||
public ScheduleMode Mode { get; set; }
|
||||
|
||||
[BsonElement("date_start")]
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
[BsonElement("date_end")]
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
[BsonElement("interval")]
|
||||
public TimeSpan? Interval { get; set; }
|
||||
|
||||
public enum ScheduleMode
|
||||
{
|
||||
Single, Loop
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue