50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DramaLing.Api.Models.Entities;
|
|
|
|
/// <summary>
|
|
/// 簡化的詞卡實體 - 移除所有複習功能
|
|
/// </summary>
|
|
public class Flashcard
|
|
{
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
// 詞卡內容
|
|
[Required]
|
|
[MaxLength(255)]
|
|
public string Word { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Translation { get; set; } = string.Empty;
|
|
|
|
public string? Definition { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string? PartOfSpeech { get; set; }
|
|
|
|
[MaxLength(255)]
|
|
public string? Pronunciation { get; set; }
|
|
|
|
public string? Example { get; set; }
|
|
|
|
public string? ExampleTranslation { get; set; }
|
|
|
|
// 基本狀態
|
|
public bool IsFavorite { get; set; } = false;
|
|
|
|
public bool IsArchived { get; set; } = false;
|
|
|
|
[MaxLength(10)]
|
|
public string? DifficultyLevel { get; set; } // A1, A2, B1, B2, C1, C2
|
|
|
|
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<FlashcardTag> FlashcardTags { get; set; } = new List<FlashcardTag>();
|
|
public virtual ICollection<ErrorReport> ErrorReports { get; set; } = new List<ErrorReport>();
|
|
public virtual ICollection<FlashcardExampleImage> FlashcardExampleImages { get; set; } = new List<FlashcardExampleImage>();
|
|
} |