using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace AsbCloudDb.Model.Manuals; [Table("t_manual"), Comment("Инструкции")] public class Manual : IId { [Key] [Column("id")] public int Id { get; set; } [Column("name"), Comment("Название")] public string Name { get; set; } = null!; [Column("date_download", TypeName = "timestamp with time zone"), Comment("Дата загрузки")] public DateTimeOffset DateDownload { get; set; } [Column("id_directory"), Comment("Id директории")] public int IdDirectory { get; set; } [Column("id_category"), Comment("Id категории файла")] public int IdCategory { get; set; } [Column("id_author"), Comment("Id автора")] public int IdAuthor { get; set; } [ForeignKey(nameof(IdDirectory))] public virtual ManualDirectory Directory { get; set; } = null!; [ForeignKey(nameof(IdCategory))] public virtual FileCategory Category { get; set; } = null!; [ForeignKey(nameof(IdAuthor))] public virtual User Author { get; set; } = null!; }