using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Infrastructure.Domain; namespace Application.Domain.Entities { /// /// 资源,用户发布的,匹配课程、以及教材章节的资源 /// [Display(Name = "资源")] public class Resource : BaseEntity { [Display(Name = "名称")] public string Name { get; set; } [Display(Name = "文件")] public string File { get; set; } [Display(Name = "用户")] public Guid? UserId { get; set; } public User User { get; set; } [Display(Name = "分类")] public Guid? CategoryId { get; set; } public ResourceCategory Category { get; set; } [Display(Name = "章节")] public Guid? SectionId { get; set; } public Section Section { get; set; } [Display(Name = "课程")] public Guid CourseId { get; set; } public Course Course { get; set; } public List LessonResources { get; set; } = new List(); } }