Files

40 lines
935 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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; }
}
}