using System.ComponentModel.DataAnnotations.Schema; namespace ADO_Web_3_Connect.Model; public class News { /// /// 主键 /// [Column("id")] public int Id { get; set; } /// /// 新闻标题 /// [Column("news_title")] public string? Title { get; set; } /// /// 新闻内容 /// [Column("news_content")] public string? Content { get; set; } /// /// 新闻类型id /// [Column("news_type")] public int? NewsTypeId { get; set; } [NotMapped] public string? NewsTypeTitle { get; set; } }