using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics.CodeAnalysis;

namespace Entities.Contracts
{
	[Table("assignment_attachments")]
	public class AssignmentAttachment
	{
		[Key]
		[Column("id")]
		public Guid Id { get; set; }

		[Required]
		[Column("assignment_id")]
		[ForeignKey("Assignment")]
		public Guid AssignmentId { get; set; }

		[Required]
		[Column("file_path")]
		[StringLength(255)]
		public string FilePath { get; set; }

		[Required]
		[Column("file_name")]
		[StringLength(255)]
		public string FileName { get; set; }

		[Column("uploaded_at")]
		public DateTime UploadedAt { get; set; }

		[Column("deleted")]
		public bool IsDeleted { get; set; }

		// Navigation Properties
		public Assignment Assignment { get; set; }

		public AssignmentAttachment()
		{
			Id = Guid.NewGuid();
		}

	}
}
