43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Diagnostics.Contracts;
|
|
|
|
namespace PortBlog.API.Entities
|
|
{
|
|
public class Candidate : BaseEntity
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int CandidateId { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string FirstName { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string LastName { get; set; } = string.Empty;
|
|
|
|
public string? Gender { get; set; }
|
|
|
|
public DateTime? Dob { get; set; }
|
|
|
|
[Required]
|
|
[EmailAddress]
|
|
[MaxLength(100)]
|
|
public string Email { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[Phone]
|
|
[MaxLength(20)]
|
|
public string Phone { get; set; } = string.Empty;
|
|
|
|
[MaxLength(200)]
|
|
public string? Address { get; set; } = string.Empty;
|
|
|
|
public string? Avatar { get; set; }
|
|
|
|
public ICollection<Resume> Resumes { get; set; } = new List<Resume>();
|
|
}
|
|
}
|