2024-11-13 17:09:15 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2024-11-14 17:11:43 +08:00
|
|
|
|
using Newtonsoft.Json;
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
|
|
|
|
namespace detect.gui.Models.Entities;
|
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Table("dat_task")]
|
|
|
|
|
[Index(nameof(DeviceSn), IsUnique = false)]
|
2024-11-13 17:09:15 +08:00
|
|
|
|
public class DetectTaskEntity
|
|
|
|
|
{
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Key]
|
|
|
|
|
[JsonProperty(PropertyName = "id")]
|
|
|
|
|
[Column("id")]
|
|
|
|
|
public long? Id { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[StringLength(255), Comment("设备序列号")]
|
|
|
|
|
[JsonProperty(PropertyName = "deviceSn")]
|
|
|
|
|
[Column("device_sn")]
|
|
|
|
|
public string? DeviceSn { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(255), Comment("名称")]
|
|
|
|
|
[JsonProperty(PropertyName = "name")]
|
|
|
|
|
[Column("name")]
|
|
|
|
|
public string? Name { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Comment("开始时间")]
|
|
|
|
|
[JsonProperty(PropertyName = "startTime")]
|
|
|
|
|
[Column("start_time")]
|
|
|
|
|
public DateTime? StartTime { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Comment("结束时间")]
|
|
|
|
|
[JsonProperty(PropertyName = "endTime")]
|
|
|
|
|
[Column("end_time")]
|
|
|
|
|
public DateTime? EndTime { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[StringLength(2000), Comment("参数")]
|
|
|
|
|
[JsonProperty(PropertyName = "paramJson")]
|
|
|
|
|
[Column("param_json")]
|
|
|
|
|
public string? ParamJson { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2025-04-18 09:53:39 +08:00
|
|
|
|
[StringLength(10000), Comment("结果")]
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[JsonProperty(PropertyName = "resultJson")]
|
|
|
|
|
[Column("result_json")]
|
|
|
|
|
public string? ResultJson { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
|
|
|
|
[Comment("状态(0.未开始 1.进行中 2.已结束 3.暂停)")]
|
|
|
|
|
[DefaultValue(0)]
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[JsonProperty(PropertyName = "state")]
|
|
|
|
|
[Column("state")]
|
2024-11-13 17:09:15 +08:00
|
|
|
|
public int State { get; set; }
|
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Comment("创建时间")]
|
|
|
|
|
[JsonProperty(PropertyName = "createTime")]
|
|
|
|
|
[Column("create_time")]
|
|
|
|
|
public DateTime? CreateTime { get; set; }
|
2024-11-13 17:09:15 +08:00
|
|
|
|
|
2024-11-14 17:11:43 +08:00
|
|
|
|
[Comment("更新时间")]
|
|
|
|
|
[JsonProperty(PropertyName = "updateTime")]
|
|
|
|
|
[Column("update_time")]
|
|
|
|
|
public DateTime? UpdateTime { get; set; }
|
2025-04-18 09:53:39 +08:00
|
|
|
|
|
|
|
|
|
[StringLength(10000), Comment("最终结果")]
|
|
|
|
|
[JsonProperty(PropertyName = "results")]
|
|
|
|
|
[Column("results")]
|
|
|
|
|
public string? Results { get; set; }
|
|
|
|
|
|
2025-04-29 12:15:18 +08:00
|
|
|
|
[StringLength(255), Comment("墙体类型")]
|
|
|
|
|
[JsonProperty(PropertyName = "wallType")]
|
|
|
|
|
[Column("wall_type")]
|
|
|
|
|
public string? WallType { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(255), Comment("方向")]
|
|
|
|
|
[JsonProperty(PropertyName = "direction")]
|
|
|
|
|
[Column("direction")]
|
|
|
|
|
public string? Direction { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(255), Comment("堆芯A点")]
|
|
|
|
|
[JsonProperty(PropertyName = "coreA")]
|
|
|
|
|
[Column("core_a")]
|
|
|
|
|
public string? CoreA { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(255), Comment("堆芯B点")]
|
|
|
|
|
[JsonProperty(PropertyName = "coreB")]
|
|
|
|
|
[Column("core_b")]
|
|
|
|
|
public string? CoreB { get; set; }
|
2025-04-18 09:53:39 +08:00
|
|
|
|
|
2024-11-13 17:09:15 +08:00
|
|
|
|
}
|