操控平台后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.9 KiB

using System.ComponentModel.DataAnnotations;
using Admin.NET.Core;
using Nest;
using SqlSugar;
using Yitter.IdGenerator;
namespace Admin.Bodk.Device.Entities.Device;
/// <summary>
/// 设备表
/// </summary>
[SugarTable(null, "设备列表")]
[SysTable]
public class Device: EntityTenant, IRepositorySettings
{
// 是否主键,是否自增
[SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = false)]
public long Id { get; set; } = YitIdHelper.NextId();
[SugarColumn(ColumnDescription = "设备名称", Length = 32)]
[Required, MaxLength(32)]
public virtual string? Name { get; set; }
[SugarColumn(ColumnDescription = "设备编号", Length = 32,IsNullable = true)]
public virtual string Code { get; set; }
[SugarColumn(ColumnDescription = "设备图片url", Length = 32,IsNullable = true)]
public virtual string PicUrl { get; set; }
[SugarColumn(ColumnDescription = "设备类型", Length = 32)]
[Required]
public virtual string Type { get; set; }
[SugarColumn(ColumnDescription = "IP",IsNullable = true)]
public virtual string Ip { get; set; }
[SugarColumn(ColumnDescription = "设备状态",IsNullable = true)]
public string Status { get; set; }
[SugarColumn(ColumnDescription = "液氮高度",IsNullable = true)]
public float LiquidNitrogenHeight { get; set; }
[SugarColumn(ColumnDescription = "温度",IsNullable = true)]
public float Temperature { get; set; }
[SugarColumn(ColumnDescription = "湿度",IsNullable = true)]
public float Humidity { get; set; }
[SugarColumn(ColumnDescription = "地址",IsNullable = true)]
public string Address { get; set; }
[SugarColumn(ColumnDescription = "基地名称",IsNullable = true)]
public string BaseName { get; set; }
[SugarColumn(ColumnDescription = "备注",IsNullable = true)]
public string Remark { get; set; }
}