mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-04 22:07:39 +00:00
Initial commit
This commit is contained in:
parent
1d9d051759
commit
9656378279
557 changed files with 182300 additions and 0 deletions
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Packt.Shared
|
||||
{
|
||||
[Index("LastName", Name = "LastName")]
|
||||
[Index("PostalCode", Name = "PostalCode")]
|
||||
public partial class Employee
|
||||
{
|
||||
public Employee()
|
||||
{
|
||||
InverseReportsToNavigation = new HashSet<Employee>();
|
||||
Orders = new HashSet<Order>();
|
||||
Territories = new HashSet<Territory>();
|
||||
}
|
||||
|
||||
[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; }
|
||||
|
||||
[ForeignKey("ReportsTo")]
|
||||
[InverseProperty("InverseReportsToNavigation")]
|
||||
public virtual Employee? ReportsToNavigation { get; set; }
|
||||
[InverseProperty("ReportsToNavigation")]
|
||||
public virtual ICollection<Employee> InverseReportsToNavigation { get; set; }
|
||||
[InverseProperty("Employee")]
|
||||
public virtual ICollection<Order> Orders { get; set; }
|
||||
|
||||
[ForeignKey("EmployeeId")]
|
||||
[InverseProperty("Employees")]
|
||||
public virtual ICollection<Territory> Territories { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue