using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.DocumentManager;
using Marco.Pms.Model.Dtos.Attendance;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;


namespace Marco.Pms.Model.AttendanceModule
{
    public class AttendanceLog : TenantRelation
    {
        public Guid Id { get; set; }
        public string Comment { get; set; } = string.Empty;
        public Guid AttendanceId { get; set; }
        [ForeignKey("AttendanceId")]
        [ValidateNever]
        public Attendance? Attendance { get; set; }

        public Guid EmployeeID { get; set; }
        [ForeignKey("EmployeeID")]
        [ValidateNever]
        public Employee? Employee { get; set; }

        public DateTime? ActivityTime { get; set; }

        /// <summary>
        /// CheckIn, CheckOut, RequestRegularize, Regularize, Reject
        /// </summary>     
        public ATTENDANCE_MARK_TYPE Activity { get; set; }


        public byte[]? Photo { get; set; } // To store the captured photo
        public string? Latitude { get; set; }
        public string? Longitude { get; set; }

        public DateTime UpdatedOn { get; set; }

        public Guid? UpdatedBy { get; set; }
        [ForeignKey("UpdatedBy")]
        [ValidateNever]
        public Employee? UpdatedByEmployee { get; set; }

        public Guid? DocumentId { get; set; }
        [ForeignKey("DocumentId")]
        [ValidateNever]
        public Document? Document { get; set; }

    }
}
