forked from ddrilling/AsbCloudServer
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_company")]
|
|
public partial class Company : IId
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("caption")]
|
|
[StringLength(255)]
|
|
public string Caption { get; set; } = null!;
|
|
|
|
[Column("id_company_type"), Comment("вид деятельности")]
|
|
[StringLength(255)]
|
|
public int IdCompanyType { get; set; }
|
|
|
|
[ForeignKey(nameof(IdCompanyType))]
|
|
[InverseProperty(nameof(Model.CompanyType.Companies))]
|
|
public virtual CompanyType CompanyType { get; set; } = null!;
|
|
|
|
[InverseProperty(nameof(User.Company))]
|
|
public virtual ICollection<User> Users { get; set; } = null!;
|
|
|
|
[InverseProperty(nameof(RelationCompanyWell.Company))]
|
|
public virtual ICollection<RelationCompanyWell> RelationCompaniesWells { get; set; } = null!;
|
|
|
|
[InverseProperty(nameof(Contact.Company))]
|
|
public virtual ICollection<Contact> Contacts { get; set; } = null!;
|
|
}
|
|
}
|