2024-07-04 11:02:45 +05:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-04-02 17:28:07 +05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
{
|
|
|
|
[Table("t_cluster"), Comment("Кусты")]
|
2021-07-19 15:11:01 +05:00
|
|
|
public partial class Cluster : IId, IMapPoint
|
2021-04-02 17:28:07 +05:00
|
|
|
{
|
|
|
|
[Key]
|
|
|
|
[Column("id")]
|
|
|
|
public int Id { get; set; }
|
2021-07-19 15:11:01 +05:00
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
[Column("caption"), Comment("Название")]
|
|
|
|
[StringLength(255)]
|
2023-02-17 15:30:17 +05:00
|
|
|
public string Caption { get; set; } = null!;
|
2021-07-19 15:11:01 +05:00
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
[Column("id_deposit")]
|
2023-02-17 15:30:17 +05:00
|
|
|
public int IdDeposit { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
[ForeignKey(nameof(IdDeposit))]
|
|
|
|
[InverseProperty(nameof(Model.Deposit.Clusters))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual Deposit Deposit { get; set; } = null!;
|
2021-07-19 15:11:01 +05:00
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
[InverseProperty(nameof(Well.Cluster))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<Well> Wells { get; set; } = null!;
|
2021-07-19 15:11:01 +05:00
|
|
|
|
|
|
|
[Column("latitude")]
|
2021-07-21 15:22:58 +05:00
|
|
|
public double? Latitude { get; set; }
|
2021-07-19 15:11:01 +05:00
|
|
|
|
|
|
|
[Column("longitude")]
|
2021-07-21 15:22:58 +05:00
|
|
|
public double? Longitude { get; set; }
|
2022-01-02 12:33:18 +05:00
|
|
|
|
|
|
|
[Column("timezone", TypeName = "jsonb"), Comment("Смещение часового пояса от UTC")]
|
2023-02-17 15:30:17 +05:00
|
|
|
public SimpleTimezone Timezone { get; set; } = new();
|
2021-04-02 17:28:07 +05:00
|
|
|
}
|
|
|
|
}
|