-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModels.cs
40 lines (33 loc) · 884 Bytes
/
Models.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
40
// Clasic one version
public class Pallet
{
public int Id { get; set; }
public string Name { get; set; }
}
public class Box
{
public int Id { get; set; }
public string Barcode { get; set; }
public bool IsOpened { get; set; }
public int? PalletId { get; set; }
public int? ParentBoxId { get; set; }
}
// This is EF version of models
public class Pallet
{
public int Id { get; set; }
public string Name { get; set; }
// Navigation property
public ICollection<Box> Boxes { get; set; }
}
public class Box
{
public int Id { get; set; }
public string Barcode { get; set; }
public bool IsOpened { get; set; }
public int? PalletId { get; set; }
public int? ParentBoxId { get; set; }
public Box ParentBox { get; set; }
public Pallet Pallet { get; set; }
public ICollection<Box> ChildrenBoxes { get; set; }
}