using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace atakanozbancom.Models.classes
{
    public enum MediaType
    {
        Image = 1,
        Iframe = 2,
        // Video = 0,
        //Document = 3
    }

    [Table("projectmedia")]
    public class projectmedia
    {
        [Key]
        public int id { get; set; }

        [Column("projectid")]
        public int project_id { get; set; }

        [ForeignKey(nameof(project_id))]
        public virtual myprojects Project { get; set; }

        [Column("mediatype")]
        public MediaType media_type { get; set; }

        [Required, StringLength(1000)]
        [Column("mediaurl")]
        public string url { get; set; }

        [Column("sortorder")]
        public int sort_order { get; set; } = 0;

        // DB'de bu kolon yok → modelden kaldırıyoruz
        // public string title { get; set; }
    }
}
