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

namespace CouchLog.Data
{
    public class SharedWatchStatus
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [MaxLength(50)]
        public required string Name { get; set; }

        [MaxLength(255)]
        public string? Description { get; set; } 

        [MaxLength(7)]
        public string? ColorCode { get; set; }

        [Required]
        public required DateTime CreationTime { get; set; }

        public DateTime? LastChange { get; set; }


        // --- Foreign Key ---
        [Required]
        public int SharedListId { get; set; }


        // --- Navigation Properties ---
        [ForeignKey(nameof(SharedListId))]
        public virtual SharedList SharedList { get; set; } = null!;

        public virtual ICollection<SharedListEntity> SharedListEntities { get; set; } = new List<SharedListEntity>();
    }
}