forked from ddrilling/AsbCloudServer
27 lines
847 B
C#
27 lines
847 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace AsbCloudDb.Model.Manuals;
|
|
|
|
[Table("t_manual_directory"), Comment("Директория для инструкций")]
|
|
public class ManualDirectory : IId
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("name"), Comment("Название")]
|
|
public string Name { get; set; } = null!;
|
|
|
|
[Column("id_parent"), Comment("Id родительской директории")]
|
|
public int? IdParent { get; set; }
|
|
|
|
[ForeignKey(nameof(IdParent))]
|
|
public virtual ManualDirectory? Parent { get; set; }
|
|
|
|
public virtual ICollection<ManualDirectory>? Children { get; set; }
|
|
|
|
public virtual ICollection<Manual>? Manuals { get; set; }
|
|
} |