| | 1 | | using System.ComponentModel.DataAnnotations; |
| | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | 3 | | using Microsoft.EntityFrameworkCore; |
| | 4 | |
|
| | 5 | | namespace LGDXRobotCloud.Data.Entities; |
| | 6 | |
|
| | 7 | | [Table("Automation.AutoTasks")] |
| | 8 | | [Index(nameof(RealmId), nameof(AssignedRobotId))] |
| | 9 | | public class AutoTask |
| | 10 | | { |
| | 11 | | [Key] |
| | 12 | | [DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
| 0 | 13 | | public int Id { get; set; } |
| | 14 | |
|
| | 15 | | [MaxLength(50)] |
| 0 | 16 | | public string? Name { get; set; } |
| | 17 | |
|
| 0 | 18 | | public ICollection<AutoTaskDetail> AutoTaskDetails { get; set; } = []; |
| | 19 | |
|
| 0 | 20 | | public int Priority { get; set; } |
| | 21 | |
|
| | 22 | | [ForeignKey("FlowId")] |
| 0 | 23 | | public Flow? Flow { get; set; } = null!; |
| | 24 | |
|
| 0 | 25 | | public int? FlowId { get; set; } |
| | 26 | |
|
| | 27 | | [ForeignKey("RealmId")] |
| 0 | 28 | | public Realm Realm { get; set; } = null!; |
| | 29 | |
|
| 0 | 30 | | public int RealmId { get; set; } |
| | 31 | |
|
| | 32 | | [ForeignKey("AssignedRobotId")] |
| 0 | 33 | | public Robot? AssignedRobot { get; set; } |
| | 34 | |
|
| 0 | 35 | | public Guid? AssignedRobotId { get; set; } |
| | 36 | |
|
| | 37 | | [ForeignKey("CurrentProgressId")] |
| 0 | 38 | | public Progress CurrentProgress { get; set; } = null!; |
| | 39 | |
|
| 0 | 40 | | public int CurrentProgressId { get; set; } |
| | 41 | |
|
| 0 | 42 | | public int? CurrentProgressOrder { get; set; } |
| | 43 | |
|
| | 44 | | [MaxLength(32)] |
| 0 | 45 | | public string? NextToken { get; set; } |
| | 46 | | } |