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("exam_attachments")]
	public class ExamAttachment
	{
		[Key]
		[Column("id")]
		public Guid Id { get; set; }

		[Required]
		[Column("exam_id")]
		public Guid ExamId { get; set; }
		[ForeignKey(nameof(ExamId))]
		public virtual Exam Exam { 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; }

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

	}
}
