DD.WellWorkover.Cloud/AsbCloudDb/Model/RelationUserDrillingProgramPart.cs

29 lines
908 B
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
#nullable disable
[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; }
[ForeignKey(nameof(IdUser))]
public virtual User User { get; set; }
}
}