/* *代码由框架生成,任何更改都可能导致被代码生成器覆盖 *如果数据库字段发生变化,请在代码生器重新生成此Model */ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; using SqlSugar; using VolPro.Entity.SystemModels; namespace VolPro.Entity.DomainModels { [Entity(TableCnName = "设备管理",TableName = "base_device",DetailTable = new Type[] { typeof(video_channel),typeof(iot_devicedata),typeof(iot_alarm)},DetailTableCnName = "视频通道,数据归档,告警记录",DBServer = "ServiceDbContext")] public partial class base_device:ServiceEntity { /// ///设备ID /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [Key] [Display(Name ="设备ID")] [Column(TypeName="int")] [Editable(true)] [Required(AllowEmptyStrings=false)] public int DeviceId { get; set; } /// ///设备名称 /// [Display(Name ="设备名称")] [MaxLength(100)] [Column(TypeName="nvarchar(100)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string DeviceName { get; set; } /// ///来源适配器(类型:实例) /// [SugarColumn(IsPrimaryKey = true)] [Key] [Display(Name ="来源适配器(类型:实例)")] [MaxLength(50)] [Column(TypeName="nvarchar(50)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string AdapterCode { get; set; } /// ///源系统设备ID /// [Display(Name ="源系统设备ID")] [MaxLength(100)] [Column(TypeName="nvarchar(100)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string SourceId { get; set; } /// ///设备种类(数据字典) /// [Display(Name ="设备种类(数据字典)")] [MaxLength(50)] [Column(TypeName="nvarchar(50)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string DeviceCategory { get; set; } /// ///设备分组(数据字典) /// [SugarColumn(IsPrimaryKey = true)] [Key] [Display(Name ="设备分组(数据字典)")] [MaxLength(20)] [Column(TypeName="nvarchar(20)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string DeviceGroup { get; set; } /// ///所属点位ID /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [Key] [Display(Name ="所属点位ID")] [Column(TypeName="int")] [Editable(true)] public int? PointId { get; set; } /// ///所属网关节点ID /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [Key] [Display(Name ="所属网关节点ID")] [Column(TypeName="int")] [Editable(true)] public int? GatewayNodeId { get; set; } /// ///是否父设备(数据字典) /// [Display(Name ="是否父设备(数据字典)")] [MaxLength(20)] [Column(TypeName="nvarchar(20)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string IsParent { get; set; } /// ///父设备ID(自引用,子设备挂父设备下) /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [Key] [Display(Name ="父设备ID(自引用,子设备挂父设备下)")] [Column(TypeName="int")] [Editable(true)] public int? ParentDeviceId { get; set; } /// ///在线状态(数据字典) /// [Display(Name ="在线状态(数据字典)")] [MaxLength(20)] [Column(TypeName="nvarchar(20)")] [Editable(true)] [Required(AllowEmptyStrings=false)] public string IsOnline { get; set; } /// ///IP地址 /// [Display(Name ="IP地址")] [MaxLength(50)] [Column(TypeName="nvarchar(50)")] [Editable(true)] public string IpAddress { get; set; } /// ///端口 /// [Display(Name ="端口")] [Column(TypeName="int")] [Editable(true)] public int? Port { get; set; } /// ///安装位置 /// [Display(Name ="安装位置")] [MaxLength(200)] [Column(TypeName="nvarchar(200)")] [Editable(true)] public string Location { get; set; } /// ///纬度 /// [Display(Name ="纬度")] [Column(TypeName="double")] [Editable(true)] public decimal? Lat { get; set; } /// ///经度 /// [Display(Name ="经度")] [Column(TypeName="double")] [Editable(true)] public decimal? Lng { get; set; } /// ///三维地图模型ID /// [Display(Name ="三维地图模型ID")] [MaxLength(100)] [Column(TypeName="nvarchar(100)")] [Editable(true)] public string MapModelId { get; set; } /// ///模型缩放比例 /// [Display(Name ="模型缩放比例")] [Column(TypeName="decimal")] [Editable(true)] public decimal? MapModelScale { get; set; } /// ///模型旋转角度(JSON) /// [Display(Name ="模型旋转角度(JSON)")] [MaxLength(100)] [Column(TypeName="nvarchar(100)")] [Editable(true)] public string MapModelRotation { get; set; } /// ///适配器扩展数据JSON(Owl/MC4/门禁字段均存于此) /// [Display(Name ="适配器扩展数据JSON(Owl/MC4/门禁字段均存于此)")] [Column(TypeName="nvarchar(max)")] [Editable(true)] public string ExtraData { get; set; } /// ///上次同步时间 /// [Display(Name ="上次同步时间")] [Column(TypeName="datetime")] [Editable(true)] public DateTime? LastSyncTime { get; set; } /// ///启用状态(数据字典) /// [Display(Name ="启用状态(数据字典)")] [MaxLength(20)] [Column(TypeName="nvarchar(20)")] [Editable(true)] public string Enable { get; set; } /// ///备注 /// [Display(Name ="备注")] [MaxLength(500)] [Column(TypeName="nvarchar(500)")] [Editable(true)] public string Remark { get; set; } /// ///创建人ID /// [Display(Name ="创建人ID")] [Column(TypeName="int")] [Editable(true)] public int? CreateID { get; set; } /// ///创建人 /// [Display(Name ="创建人")] [MaxLength(50)] [Column(TypeName="nvarchar(50)")] [Editable(true)] public string Creator { get; set; } /// ///创建时间 /// [Display(Name ="创建时间")] [Column(TypeName="datetime")] [Editable(true)] public DateTime? CreateDate { get; set; } /// ///修改人ID /// [Display(Name ="修改人ID")] [Column(TypeName="int")] [Editable(true)] public int? ModifyID { get; set; } /// ///修改人 /// [Display(Name ="修改人")] [MaxLength(50)] [Column(TypeName="nvarchar(50)")] [Editable(true)] public string Modifier { get; set; } /// ///修改时间 /// [Display(Name ="修改时间")] [Column(TypeName="datetime")] [Editable(true)] public DateTime? ModifyDate { get; set; } [Display(Name ="视频通道")] [ForeignKey("DeviceId")][Navigate(NavigateType.OneToMany,nameof(DeviceId),nameof(DeviceId))] public List video_channel { get; set; } [Display(Name ="数据归档")] [ForeignKey("DeviceId")][Navigate(NavigateType.OneToMany,nameof(DeviceId),nameof(DeviceId))] public List iot_devicedata { get; set; } [Display(Name ="告警记录")] [ForeignKey("DeviceId")][Navigate(NavigateType.OneToMany,nameof(DeviceId),nameof(DeviceId))] public List iot_alarm { get; set; } } }