forked from markjprice/web-dev-net9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.cs
79 lines (56 loc) · 2.07 KB
/
Employee.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Northwind.EntityModels;
[Index("LastName", Name = "LastName")]
[Index("PostalCode", Name = "PostalCode")]
public partial class Employee
{
[Key]
public int EmployeeId { get; set; }
[StringLength(20)]
public string LastName { get; set; } = null!;
[StringLength(10)]
public string FirstName { get; set; } = null!;
[StringLength(30)]
public string? Title { get; set; }
[StringLength(25)]
public string? TitleOfCourtesy { get; set; }
[Column(TypeName = "datetime")]
public DateTime? BirthDate { get; set; }
[Column(TypeName = "datetime")]
public DateTime? HireDate { get; set; }
[StringLength(60)]
public string? Address { get; set; }
[StringLength(15)]
public string? City { get; set; }
[StringLength(15)]
public string? Region { get; set; }
[StringLength(10)]
public string? PostalCode { get; set; }
[StringLength(15)]
public string? Country { get; set; }
[StringLength(24)]
public string? HomePhone { get; set; }
[StringLength(4)]
public string? Extension { get; set; }
[Column(TypeName = "image")]
public byte[]? Photo { get; set; }
[Column(TypeName = "ntext")]
public string? Notes { get; set; }
public int? ReportsTo { get; set; }
[StringLength(255)]
public string? PhotoPath { get; set; }
[InverseProperty("ReportsToNavigation")]
public virtual ICollection<Employee> InverseReportsToNavigation { get; set; } = new List<Employee>();
[InverseProperty("Employee")]
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
[ForeignKey("ReportsTo")]
[InverseProperty("InverseReportsToNavigation")]
public virtual Employee? ReportsToNavigation { get; set; }
[ForeignKey("EmployeeId")]
[InverseProperty("Employees")]
public virtual ICollection<Territory> Territories { get; set; } = new List<Territory>();
}