dramaling-vocab-learning/backend/DramaLing.Api/Models/Entities/CardSet.cs

30 lines
791 B
C#

using System.ComponentModel.DataAnnotations;
namespace DramaLing.Api.Models.Entities;
public class CardSet
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
[Required]
[MaxLength(255)]
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
[MaxLength(50)]
public string Color { get; set; } = "bg-blue-500";
public int CardCount { get; set; } = 0;
public bool IsDefault { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
// Navigation Properties
public virtual User User { get; set; } = null!;
public virtual ICollection<Flashcard> Flashcards { get; set; } = new List<Flashcard>();
}