|  |  | 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)] | 
|  | 364 | 13 |  |   public int Id { get; set; } | 
|  |  | 14 |  |  | 
|  |  | 15 |  |   [MaxLength(50)] | 
|  | 403 | 16 |  |   public string? Name { get; set; } | 
|  |  | 17 |  |  | 
|  | 319 | 18 |  |   public ICollection<AutoTaskDetail> AutoTaskDetails { get; set; } = []; | 
|  |  | 19 |  |  | 
|  | 312 | 20 |  |   public ICollection<AutoTaskJourney> AutoTaskJourneys { get; set; } = []; | 
|  |  | 21 |  |  | 
|  | 334 | 22 |  |   public int Priority { get; set; } | 
|  |  | 23 |  |  | 
|  |  | 24 |  |   [ForeignKey("FlowId")] | 
|  | 312 | 25 |  |   public Flow? Flow { get; set; } = null!; | 
|  |  | 26 |  |  | 
|  | 334 | 27 |  |   public int? FlowId { get; set; } | 
|  |  | 28 |  |  | 
|  |  | 29 |  |   [ForeignKey("RealmId")] | 
|  | 312 | 30 |  |   public Realm Realm { get; set; } = null!; | 
|  |  | 31 |  |  | 
|  | 336 | 32 |  |   public int RealmId { get; set; } | 
|  |  | 33 |  |  | 
|  |  | 34 |  |   [ForeignKey("AssignedRobotId")] | 
|  | 0 | 35 |  |   public Robot? AssignedRobot { get; set; } | 
|  |  | 36 |  |  | 
|  | 266 | 37 |  |   public Guid? AssignedRobotId { get; set; } | 
|  |  | 38 |  |  | 
|  |  | 39 |  |   [ForeignKey("CurrentProgressId")] | 
|  | 312 | 40 |  |   public Progress CurrentProgress { get; set; } = null!; | 
|  |  | 41 |  |  | 
|  | 433 | 42 |  |   public int CurrentProgressId { get; set; } | 
|  |  | 43 |  |  | 
|  | 0 | 44 |  |   public int? CurrentProgressOrder { get; set; } | 
|  |  | 45 |  |  | 
|  |  | 46 |  |   [MaxLength(32)] | 
|  | 30 | 47 |  |   public string? NextToken { get; set; } | 
|  |  | 48 |  | } |