using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace BMA.EHR.Recurit.Exam.Service.Models
{
    public class Career : EntityBase
    {
        [Required, Column(Order = 9), Comment("Id ผู้สมัคร")]
        public virtual Candidate? Candidate { get; set; }

        [Required, Column(Order = 3), Comment("ชื่อตำแหน่ง")]
        public string Position { get; set; } = string.Empty;

        [Column(Order = 4), Comment("กลุ่ม/ฝ่าย")]
        public string? Group { get; set; } = string.Empty;

        [Column(Order = 5), Comment("กอง")]
        public string? Pile { get; set; } = string.Empty;

        [Column(Order = 6), Comment("สังกัด")]
        public string? Org { get; set; } = string.Empty;

        [Required, Column(Order = 1), Comment("ระยะเวลาเริ่ม")]
        public DateTime DurationStart { get; set; } = DateTime.Now.Date;

        [Required, Column(Order = 2), Comment("ระยะเวลาสิ้นสุด")]
        public DateTime DurationEnd { get; set; } = DateTime.Now.Date;

        [Required, Column(Order = 7), Comment("ระยะเวลา")]
        public string RangeDate { get; set; } = string.Empty;

        [Required, Column(Order = 8), Comment("ประเภท")]
        public string Type { get; set; } = string.Empty;
    }
}
