46 lines
1.7 KiB
C#
46 lines
1.7 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace BethanysPieShopHRM.Shared.Domain
|
|
{
|
|
public class Employee
|
|
{
|
|
public int EmployeeId { get; set; }
|
|
[Required]
|
|
[StringLength(50, ErrorMessage = "First Name is Too long.")]
|
|
public string FirstName { get; set; } = string.Empty;
|
|
[Required]
|
|
[StringLength(50, ErrorMessage ="Last Name is Too long.")]
|
|
public string LastName { get; set; } = string.Empty;
|
|
public DateTime BirthDate { get; set; }
|
|
[Required]
|
|
[EmailAddress]
|
|
public string Email { get; set; } = string.Empty;
|
|
public string Street { get; set; } = string.Empty;
|
|
public string Zip { get; set; } = string.Empty;
|
|
public string City { get; set; } = string.Empty;
|
|
[Required(ErrorMessage = "Select a Country for address")]
|
|
public int CountryId { get; set; }
|
|
public Country? Country { get; set; } = default!;
|
|
public string PhoneNumber { get; set; } = string.Empty;
|
|
public bool Smoker { get; set; }
|
|
public MaritalStatus MaritalStatus { get; set; }
|
|
public Gender Gender { get; set; }
|
|
[StringLength(1000)]
|
|
public string? Comment { get; set; }
|
|
public DateTime? JoinedDate { get; set; }
|
|
public DateTime? ExitDate { get; set; }
|
|
[Required(ErrorMessage = "Select a job category.")]
|
|
public int JobCategoryId { get; set; }
|
|
public JobCategory? JobCategory { get; set; } = default!;
|
|
|
|
public double? Latitude { get; set; }
|
|
public double? Longitude { get; set; }
|
|
|
|
[NotMapped]
|
|
public byte[]? ImageContent { get; set; }
|
|
public string? ImageName { get; set; }
|
|
}
|
|
}
|