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

namespace ZpcBulletinBoard.Models.Editor
{
    public class Note
    {
        public enum TypeEnum
        {
            Board = 1,
            Image = 2,
            ExternalLink = 3
        }

        [Key]
        public int IdNote { get; set; }

        [Required]
        [ForeignKey("BulletinBoardPage")]
        public int IdBulletinBoardPage { get; set; }

        [Required]
        public int X { get; set; }

        [Required]
        public int Y { get; set; }

        [Required]
        public int Width { get; set; }

        [Required]
        public int Height { get; set; }

        [Required]
        public string Content { get; set; }

        [Required]
        public int Zindex { get; set; }

        [Required]
        public string ColorClass { get; set; }

        [Required]
        public TypeEnum Type { get; set; }

        // ForeignKey
        public BulletinBoardPage BulletinBoardPage { get; set; }
    }
}
