forked from ddrilling/AsbCloudServer
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace AsbCloudDb.Model
|
|||
|
{
|
|||
|
[Table("t_company")]
|
|||
|
public partial class Company : IId
|
|||
|
{
|
|||
|
public Company()
|
|||
|
{
|
|||
|
Users = new HashSet<User>();
|
|||
|
Wells = new HashSet<Well>();
|
|||
|
}
|
|||
|
|
|||
|
[Key]
|
|||
|
[Column("id")]
|
|||
|
public int Id { get; set; }
|
|||
|
|
|||
|
[Column("caption")]
|
|||
|
[StringLength(255)]
|
|||
|
public string Caption { get; set; }
|
|||
|
|
|||
|
[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; }
|
|||
|
|
|||
|
[InverseProperty(nameof(User.Company))]
|
|||
|
public virtual ICollection<User> Users { get; set; }
|
|||
|
|
|||
|
[InverseProperty(nameof(Well.Companies))]
|
|||
|
public virtual ICollection<Well> Wells { get; set; }
|
|||
|
}
|
|||
|
}
|