251029
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
namespace FATrace.Model
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
46
FATrace.Model/DayCount.cs
Normal file
46
FATrace.Model/DayCount.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 每日的产量计数
|
||||
/// </summary>
|
||||
[Table(Name = "DayCount")]
|
||||
public class DayCount
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 内袋二维码
|
||||
///// </summary>
|
||||
//[Column(Name = "InBagCode", IsNullable = false, StringLength = 100)]
|
||||
//public string? InBagCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前的产量
|
||||
/// </summary>
|
||||
[Column(Name = "Count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期
|
||||
/// </summary>
|
||||
[Column(Name = "DayInfo", IsNullable = false, StringLength = 20)]
|
||||
public string? DayInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
}
|
||||
}
|
||||
90
FATrace.Model/DownloadTask.cs
Normal file
90
FATrace.Model/DownloadTask.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 下载任务实体(持久化队列项)。
|
||||
/// 表示一条从海康 NVR 下载视频的计划与执行状态。
|
||||
/// </summary>
|
||||
[Table(Name = "DownloadTask")]
|
||||
public class DownloadTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增主键。
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务条码/编号(用于与 OEMRawUse/VideoAction 关联)。
|
||||
/// </summary>
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料名称。
|
||||
/// </summary>
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? RawName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作用户标识。
|
||||
/// </summary>
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务状态:Pending/Running/Completed/Failed/Canceled。
|
||||
/// </summary>
|
||||
[Column(IsNullable = false)]
|
||||
public TaskStatus Status { get; set; } = TaskStatus.Pending;
|
||||
|
||||
/// <summary>
|
||||
/// 下载进度 0-100。
|
||||
/// </summary>
|
||||
[Column(IsNullable = false)]
|
||||
public short Progress { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 目标视频保存路径(生成的本地文件全路径)。
|
||||
/// </summary>
|
||||
[Column(StringLength = 200)]
|
||||
public string? VideoFilePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失败时的错误信息。
|
||||
/// </summary>
|
||||
[Column(StringLength = 500)]
|
||||
public string? Error { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已尝试次数(每次 Running 前加一)。
|
||||
/// </summary>
|
||||
[Column(IsNullable = false)]
|
||||
public int TryCount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// NVR 下载的开始时间(默认当前时间 - 5 分钟)。
|
||||
/// </summary>
|
||||
[Column(IsNullable = false)]
|
||||
public DateTime NvrStartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NVR 下载的结束时间(默认当前时间)。
|
||||
/// </summary>
|
||||
[Column(IsNullable = false)]
|
||||
public DateTime NvrEndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间。
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最近一次更新时间。
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
}
|
||||
}
|
||||
56
FATrace.Model/JellyfinMonitorTask.cs
Normal file
56
FATrace.Model/JellyfinMonitorTask.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
[Table(Name = "JellyfinMonitorTask")]
|
||||
public class JellyfinMonitorTask
|
||||
{
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Column(IsNullable = false)]
|
||||
public long OemRawUseId { get; set; }
|
||||
|
||||
[Column(StringLength = 256, IsNullable = false)]
|
||||
public string? LocalFileNameOrPath { get; set; }
|
||||
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? RawName { get; set; }
|
||||
|
||||
[Column(StringLength = 100, IsNullable = false)]
|
||||
public string? User { get; set; }
|
||||
|
||||
[Column(IsNullable = false)]
|
||||
public TaskStatus Status { get; set; } = TaskStatus.Pending;
|
||||
|
||||
[Column(IsNullable = false)]
|
||||
public int TryCount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 对应下载任务的时间窗口:开始时间(用于 VideoAction.StartTime)
|
||||
/// </summary>
|
||||
[Column(IsNullable = true)]
|
||||
public DateTime? NvrStartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应下载任务的时间窗口:结束时间(用于 VideoAction.EndTime)
|
||||
/// </summary>
|
||||
[Column(IsNullable = true)]
|
||||
public DateTime? NvrEndTime { get; set; }
|
||||
|
||||
[Column(StringLength = 100)]
|
||||
public string? FoundItemId { get; set; }
|
||||
|
||||
[Column(StringLength = 500)]
|
||||
public string? Error { get; set; }
|
||||
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
}
|
||||
}
|
||||
35
FATrace.Model/RawCtrInfo.cs
Normal file
35
FATrace.Model/RawCtrInfo.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料控件信息
|
||||
/// </summary>
|
||||
public class RawCtrInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料名称
|
||||
/// </summary>
|
||||
public string? RawName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料编码
|
||||
/// </summary>
|
||||
public string? RawCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料来源
|
||||
/// </summary>
|
||||
public RawSource RawSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控件名称
|
||||
/// </summary>
|
||||
public string? BtnControlName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
76
FATrace.Model/RawProInput.cs
Normal file
76
FATrace.Model/RawProInput.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料生产
|
||||
/// 入库信息
|
||||
/// </summary>
|
||||
[Table(Name = "RawProInput")]
|
||||
public class RawProInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料编号
|
||||
/// </summary>
|
||||
[Column(Name = "RawCode", IsNullable = false, StringLength = 30)]
|
||||
public string? RawCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料名称
|
||||
/// </summary>
|
||||
[Column(Name = "RawName", IsNullable = false, StringLength = 100)]
|
||||
public string? RawName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库重量
|
||||
/// </summary>
|
||||
[Column(Name = "Weight")]
|
||||
public double Weight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批号
|
||||
/// </summary>
|
||||
[Column(Name = "Batch", IsNullable = false, StringLength = 50)]
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保质期 年
|
||||
/// </summary>
|
||||
[Column(Name = "ShelfLife")]
|
||||
public int ShelfLife { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料来源
|
||||
/// </summary>
|
||||
[Column(Name = "RawSource")]
|
||||
public RawSource RawSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 剩余重量
|
||||
/// Kg
|
||||
/// </summary>
|
||||
[Column(Name = "RemainWeight")]
|
||||
public double RemainWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///分拆 状态
|
||||
/// false:未分拆完毕
|
||||
/// true:分拆完毕
|
||||
/// </summary>
|
||||
[Column(Name = "RawState")]
|
||||
public RawSplitState RawState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
109
FATrace.Model/RawProUse.cs
Normal file
109
FATrace.Model/RawProUse.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料生产 使用信息
|
||||
/// </summary>
|
||||
[Table(Name = "RawProUse")]
|
||||
public class RawProUse
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料编号
|
||||
/// </summary>
|
||||
[Column(Name = "RawCode", IsNullable = false, StringLength = 30)]
|
||||
public string? RawCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原料名称
|
||||
/// </summary>
|
||||
[Column(Name = "RawName", IsNullable = false, StringLength = 100)]
|
||||
public string? RawName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内袋二维码
|
||||
/// </summary>
|
||||
[Column(Name = "InBagCode", IsNullable = false, StringLength = 100)]
|
||||
public string? InBagCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外箱二维码
|
||||
/// </summary>
|
||||
[Column(Name = "BoxCode", IsNullable = false, StringLength = 100)]
|
||||
public string? BoxCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批号
|
||||
/// </summary>
|
||||
[Column(Name = "Batch", IsNullable = false, StringLength = 50)]
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保质期 年
|
||||
/// </summary>
|
||||
[Column(Name = "ShelfLife")]
|
||||
public double ShelfLife { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 称重重量 g 克
|
||||
/// </summary>
|
||||
[Column(Name = "Weight")]
|
||||
public double Weight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 剩余重量 g 克
|
||||
/// 剩余重量 = 当前产品的入库总重量-当前称重的称量重量
|
||||
/// </summary>
|
||||
[Column(Name = "RemainWeight")]
|
||||
public double RemainWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库总重量
|
||||
/// 当前的入库的总重量
|
||||
/// </summary>
|
||||
[Column(Name = "StockWeight")]
|
||||
public double StockWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 称重时间
|
||||
/// </summary>
|
||||
[Column(Name = "WeightTime")]
|
||||
public DateTime WeightTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作者
|
||||
/// </summary>
|
||||
[Column(Name = "OpUser", IsNullable = false, StringLength = 20)]
|
||||
public string? OpUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 确认者
|
||||
/// </summary>
|
||||
[Column(Name = "CheckUser", IsNullable = false, StringLength = 100)]
|
||||
public string? CheckUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出库时间
|
||||
/// 外箱扫码出库时间
|
||||
/// </summary>
|
||||
[Column(Name = "OutTime")]
|
||||
public DateTime OutTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
17
FATrace.Model/RawSource.cs
Normal file
17
FATrace.Model/RawSource.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料来源
|
||||
/// </summary>
|
||||
public enum RawSource
|
||||
{
|
||||
China = 1,
|
||||
Japan = 2
|
||||
}
|
||||
}
|
||||
26
FATrace.Model/RawSplitState.cs
Normal file
26
FATrace.Model/RawSplitState.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料拆分状态
|
||||
/// </summary>
|
||||
public enum RawSplitState
|
||||
{
|
||||
/// <summary>
|
||||
/// 分拆中
|
||||
/// 一个原料只要存在的话,就是分拆中,否则是分拆完成
|
||||
/// </summary>
|
||||
Splitting = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 分拆完成
|
||||
/// </summary>
|
||||
SplitComplete = 2,
|
||||
|
||||
}
|
||||
}
|
||||
35
FATrace.Model/TaskStatus.cs
Normal file
35
FATrace.Model/TaskStatus.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用任务状态枚举。
|
||||
/// </summary>
|
||||
public enum TaskStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 待处理(已入队但尚未开始)。
|
||||
/// </summary>
|
||||
Pending = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 运行中(正在处理)。
|
||||
/// </summary>
|
||||
Running = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 已完成(处理成功)。
|
||||
/// </summary>
|
||||
Completed = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 失败(处理过程中出现错误)。
|
||||
/// </summary>
|
||||
Failed = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 已取消(由用户或系统取消处理)。
|
||||
/// </summary>
|
||||
Canceled = 4
|
||||
}
|
||||
}
|
||||
52
FATrace.Model/TbUser.cs
Normal file
52
FATrace.Model/TbUser.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FATrace.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户登录
|
||||
/// </summary>
|
||||
[Table(Name = "dbo.TbUser")]
|
||||
public class TbUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 机器名称
|
||||
///// </summary>
|
||||
//[Column(Name = "MachineName", IsNullable = false, StringLength = 20)]
|
||||
//public string MachineName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名称
|
||||
/// </summary>
|
||||
[Column(Name = "UserName", IsNullable = false, StringLength = 20)]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Column(Name = "Password", IsNullable = false, StringLength = 20)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 等级
|
||||
/// </summary>
|
||||
[Column(Name = "AccessLevel", IsNullable = false, StringLength = 20)]
|
||||
public string AccessLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user