This commit is contained in:
60
server/AyaNova/models/OpsJob.cs
Normal file
60
server/AyaNova/models/OpsJob.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Operations job
|
||||
/// </summary>
|
||||
public partial class OpsJob
|
||||
{
|
||||
[Key]
|
||||
public Guid GId { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime Created { get; set; }
|
||||
public uint ConcurrencyToken { get; set; }
|
||||
|
||||
[Required]
|
||||
public long OwnerId { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
//------------------------
|
||||
[Required]
|
||||
public bool Exclusive { get; set; }//true lock api and don't run other jobs until completed / false=run any time with other jobs async
|
||||
public DateTime StartAfter { get; set; }
|
||||
[Required]
|
||||
public JobType JobType { get; set; }
|
||||
public long ObjectId { get; set; }
|
||||
public AyaType ObjectType { get; set; }
|
||||
[Required]
|
||||
public JobStatus JobStatus { get; set; }
|
||||
/// <summary>
|
||||
/// Json string of any required extra info for job
|
||||
/// </summary>
|
||||
public string JobInfo { get; set; }//json as string of any required extra info for job
|
||||
|
||||
|
||||
public OpsJob(){
|
||||
GId=new Guid();
|
||||
Created=DateTime.UtcNow;
|
||||
OwnerId=1;
|
||||
Name="new job";
|
||||
Exclusive=false;
|
||||
StartAfter=Created;
|
||||
JobType=JobType.NotSet;
|
||||
ObjectId=0;
|
||||
ObjectType=AyaType.NotValid;
|
||||
JobStatus=JobStatus.Sleeping;
|
||||
JobInfo=null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user