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

39 lines
1.1 KiB
C#

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_contact"), Comment("Контакты")]
public partial class Contact : IId
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("id_company")]
public int IdCompany { get; set; }
[Column("fio"), Comment("ФИО")]
[StringLength(255)]
public string FIO { get; set; } = string.Empty;
[Column("email"), Comment("email")]
[StringLength(255)]
public string Email { get; set; } = string.Empty;
[Column("phone"), Comment("номер телефона")]
[StringLength(50)]
public string? Phone { get; set; }
[Column("position"), Comment("должность")]
[StringLength(255)]
public string? Position { get; set; }
[ForeignKey(nameof(IdCompany))]
[InverseProperty(nameof(Model.Company.Contacts))]
public virtual Company Company { get; set; } = null!;
}
}