forked from equinor/flotilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlannedTask.cs
39 lines (32 loc) · 969 Bytes
/
PlannedTask.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Api.Controllers.Models;
using Microsoft.EntityFrameworkCore;
#nullable disable
namespace Api.Database.Models
{
[Owned]
public class PlannedTask
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public string Id { get; set; }
[MaxLength(64)]
public string TagId { get; set; }
[MaxLength(64)]
public Uri URL { get; set; }
public IList<PlannedInspection> Inspections { get; set; }
public PlannedTask()
{
Inspections = new List<PlannedInspection>();
}
public PlannedTask(EchoTag echoTag)
{
Inspections = echoTag.Inspections
.Select(inspection => new PlannedInspection(inspection))
.ToList();
URL = echoTag.URL;
TagId = echoTag.TagId;
}
}
}