forked from ddrilling/AsbCloudServer
27 lines
899 B
C#
27 lines
899 B
C#
|
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 IdDrillingProgramPartRole { get; set; }
|
|||
|
|
|||
|
[ForeignKey(nameof(IdDrillingProgramPart))]
|
|||
|
public virtual DrillingProgramPart DrillingProgramPart { get; set; }
|
|||
|
|
|||
|
[ForeignKey(nameof(IdUser))]
|
|||
|
[InverseProperty(nameof(Model.User.RelationUsersUserRoles))]
|
|||
|
public virtual User User { get; set; }
|
|||
|
|
|||
|
}
|
|||
|
}
|