using System.ComponentModel.DataAnnotations;

namespace WorkManagementTool.Data.Entities
{
    public class Homework
    {
        public int Id { get; set; }
        [Required]
        [MaxLength(200, ErrorMessage = "Title must be less than 200 caracters")]
        [MinLength(3, ErrorMessage = "Title must be at least 3 caracters")]
        public required string Title { get; set; } = null!;
        [MaxLength(1000, ErrorMessage = "Description must be less than 1000 caracters")]
        public string? Description { get; set; }
        [Required]
        [DataType(DataType.Date)]
        public required DateTime DueDate { get; set; }
        public bool IsCompleted { get; set; } = false;
        public SchoolSubject SchoolSubject { get; set; } = null!;
        public string? DeliveryMethod { get; set; }
        public ApplicationUser CreatedBy { get; set; } = null!;
        public bool Deleted { get; set; } = false;
        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    }
}
