V1版本
This commit is contained in:
53
CapMachine.Model/CANLIN/CANConfigExd.cs
Normal file
53
CapMachine.Model/CANLIN/CANConfigExd.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Model.CANLIN
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN配置拓展数据
|
||||
/// </summary>
|
||||
[Table(Name = "CANConfigExd")]
|
||||
public class CANConfigExd
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 波特率
|
||||
/// </summary>
|
||||
[Column(Name = "BaudRate")]
|
||||
public int BaudRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 周期
|
||||
/// </summary>
|
||||
[Column(Name = "Cycle")]
|
||||
public int Cycle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dbc文件路径
|
||||
/// </summary>
|
||||
[Column(Name = "DbcPath", IsNullable = false, StringLength = 500)]
|
||||
public string? DbcPath { get; set; }
|
||||
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
|
||||
///// </summary>
|
||||
////[Key]
|
||||
//public long CanLinConfigProId { get; set; }
|
||||
|
||||
|
||||
////[Navigate(nameof(CanLinConfigProId))]
|
||||
//public CanLinConfigPro? CanLinConfigPro { get; set; }
|
||||
}
|
||||
}
|
||||
56
CapMachine.Model/CANLIN/CanLinConfigPro.cs
Normal file
56
CapMachine.Model/CANLIN/CanLinConfigPro.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Model.CANLIN
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN和LIN的配置信息数据
|
||||
/// </summary>
|
||||
[Table(Name = "CanLinConfigPro")]
|
||||
public class CanLinConfigPro
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置名称
|
||||
/// </summary>
|
||||
[Column(Name = "ConfigName", IsNullable = false, StringLength = 100)]
|
||||
public string? ConfigName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类信息-CAN/LIN
|
||||
/// </summary>
|
||||
[Column(Name = "CANLINInfo", IsNullable = false, MapType = typeof(string))]
|
||||
public CANLIN CANLINInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(ServerTime = DateTimeKind.Local, CanUpdate = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public List<CanLinRWConfig>? CanLinConfigContents { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ///////////////////////////////////////////导航属性 一对一///////////////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public long CANConfigExdId { get; set; } // 外键字段,必要
|
||||
public CANConfigExd CANConfigExd { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
44
CapMachine.Model/CANLIN/CanLinEmun.cs
Normal file
44
CapMachine.Model/CANLIN/CanLinEmun.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Model.CANLIN
|
||||
{
|
||||
public class CanLinEnum
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CANLIN的枚举
|
||||
/// </summary>
|
||||
public enum CANLIN
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN
|
||||
/// </summary>
|
||||
CAN = 1,
|
||||
/// <summary>
|
||||
/// LIN
|
||||
/// </summary>
|
||||
LIN = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write/Read
|
||||
/// </summary>
|
||||
public enum RW
|
||||
{
|
||||
/// <summary>
|
||||
/// Write
|
||||
/// </summary>
|
||||
Write = 1,
|
||||
/// <summary>
|
||||
/// Read
|
||||
/// </summary>
|
||||
Read = 2,
|
||||
}
|
||||
|
||||
}
|
||||
55
CapMachine.Model/CANLIN/CanLinRWConfig.cs
Normal file
55
CapMachine.Model/CANLIN/CanLinRWConfig.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Model.CANLIN
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN和LIN的配置数据内容
|
||||
/// </summary>
|
||||
[Table(Name = "CanLinConfigContent")]
|
||||
public class CanLinRWConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 输入输出信息 读取/写入/系统
|
||||
/// </summary>
|
||||
[Column(Name = "RWInfo", IsNullable = false, MapType = typeof(string))]
|
||||
public RW RWInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置项名称-比如转速、功率限制等
|
||||
/// </summary>
|
||||
[Column(Name = "Name", IsNullable = false, StringLength = 50)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置项值
|
||||
/// </summary>
|
||||
[Column(Name = "Content", IsNullable = false, StringLength = 100)]
|
||||
public string? Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置项默认值和数据
|
||||
/// </summary>
|
||||
[Column(Name = "DefautValue", IsNullable = true, StringLength = 50)]
|
||||
public string? DefautValue { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public long CanLinConfigProId { get; set; }
|
||||
public CanLinConfigPro? CanLinConfigPro { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user