mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add Test
This commit is contained in:
parent
71f2441a0b
commit
5741e4c2e5
@ -1,4 +1,5 @@
|
|||||||
using SqlSugar;
|
using OrmTest;
|
||||||
|
using SqlSugar;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -20,6 +21,8 @@ namespace TDengineTest
|
|||||||
|
|
||||||
CodeFirst4(db);
|
CodeFirst4(db);
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<TDHistoryValue>();
|
||||||
|
|
||||||
//更多建表用例
|
//更多建表用例
|
||||||
db.CodeFirst.InitTables<CodeFirst03>();
|
db.CodeFirst.InitTables<CodeFirst03>();
|
||||||
db.Insertable(new CodeFirst03()
|
db.Insertable(new CodeFirst03()
|
||||||
|
54
Src/Asp.NetCore2/TDengineTest/Models/Unit/TDHistoryValue.cs
Normal file
54
Src/Asp.NetCore2/TDengineTest/Models/Unit/TDHistoryValue.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
using SqlSugar.TDengine;
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 历史数据表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("historyValue")]
|
||||||
|
public class TDHistoryValue : STable
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上传时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(InsertServerTime = true, IsPrimaryKey = true)]
|
||||||
|
[Description("上传时间")]
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 采集时间
|
||||||
|
/// </summary>
|
||||||
|
[Description("采集时间")]
|
||||||
|
public DateTime CollectTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备名称
|
||||||
|
/// </summary>
|
||||||
|
[Description("设备名称")]
|
||||||
|
public string DeviceName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 变量名称
|
||||||
|
/// </summary>
|
||||||
|
[Description("变量名称")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否在线
|
||||||
|
/// </summary>
|
||||||
|
[Description("是否在线")]
|
||||||
|
public bool IsOnline { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 变量值
|
||||||
|
/// </summary>
|
||||||
|
[Description("变量值")]
|
||||||
|
[SugarColumn(Length = 18, DecimalDigits = 2)]
|
||||||
|
public double Value { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user