using Lada.Framework.Data.Domains.Hr;
using Lada.Framework.Infrastructures.Helpers;
using ladaexpress.vn.Infrastructures.DTO.Models.Post.Detail;
using ladaexpress.vn.Infrastructures.DTO.Models.Tags;
using System.Globalization;

namespace ladaexpress.vn.Infrastructures.DTO.Models.Hr
{
    public class JobDetailModel
    {
        public int Id { get; set; }
        public string Thumbnail { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }

        public string WorkingAddress { get; set; }


        public DateTimeOffset? StartDate { get; set; }
        public string StartDateStr => StartDate.HasValue ? StartDate.Value.ToString("dd/MM/yyy") : "";

        public DateTimeOffset? EndDate { get; set; }
        public string EndDateStr => EndDate.HasValue ? EndDate.Value.ToString("dd/MM/yyy") : "";
        public string Slug { get; set; }

        /// <summary>
        /// Trạng thái tin tuyển dụng: mở / đóng
        /// </summary>
        public JobStatus JobStatus { get; set; }

        public string JobStatusStr => JobStatus.GetDescription();

        public List<TagItem> Tags { get; set; } = new List<TagItem>();

        #region Lương

        /// <summary>
        /// Mức lương tối thiểu
        /// </summary>
        public decimal MinSalary { get; set; }

        public string MinSalaryStr => MinSalary.ToString("C0", CultureInfo.CreateSpecificCulture("vi-VN"));

        /// <summary>
        /// Mức lương tối đa
        /// </summary>
        public decimal MaxSalary { get; set; }

        public string MaxSalaryStr => MaxSalary.ToString("C0", CultureInfo.CreateSpecificCulture("vi-VN"));
        #endregion
    }
}
