using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model { [Table("t_relation_user_drilling_program_part"), Comment("Отношение пользователей и частей ПБ")] public class RelationUserDrillingProgramPart { [Column("id_user")] public int IdUser { get; set; } [Column("id_drilling_program_part")] public int IdDrillingProgramPart { get; set; } [Column("id_role"), Comment("1 - publisher, 2 - approver")] public int IdUserRole { get; set; } [ForeignKey(nameof(IdDrillingProgramPart))] [InverseProperty(nameof(Model.DrillingProgramPart.RelatedUsers))] public virtual DrillingProgramPart DrillingProgramPart { get; set; } = null!; [ForeignKey(nameof(IdUser))] public virtual User User { get; set; } = null!; } }