mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
Add unit test
This commit is contained in:
parent
aeaed2cbb6
commit
39b29fa5d0
@ -81,9 +81,110 @@ namespace OrmTest
|
|||||||
db.CodeFirst.InitTables<CodeFloatddfa1a2>();
|
db.CodeFirst.InitTables<CodeFloatddfa1a2>();
|
||||||
db.Insertable(new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }).ExecuteCommand();
|
db.Insertable(new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }).ExecuteCommand();
|
||||||
db.Insertable(new List<CodeFloatddfa1a2> { new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }, new CodeFloatddfa1a2() { xx = DateTimeOffset.Now } }).ExecuteCommand();
|
db.Insertable(new List<CodeFloatddfa1a2> { new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }, new CodeFloatddfa1a2() { xx = DateTimeOffset.Now } }).ExecuteCommand();
|
||||||
|
db.CodeFirst.InitTables<Area>();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SugarTable("TNL_Tunnel1")]
|
||||||
|
public class Area
|
||||||
|
{
|
||||||
|
[SugarColumn(ColumnName = "Tunnel_ID", IsPrimaryKey = true)]
|
||||||
|
//[JsonConverter(typeof(IdToStringConverter))]
|
||||||
|
public long AreaId { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "Org_ID")]
|
||||||
|
public int OrgId { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "TunnelName_TX")]
|
||||||
|
public string AreaName { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "TunnelCode_CD", IsNullable = true)]
|
||||||
|
public string TunnelCodeCd { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "GroupNumber_NR", DefaultValue = "1", IsNullable = true)]
|
||||||
|
public int GroupnumberNr { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SortNo_NR", DefaultValue = "1", IsNullable = true)]
|
||||||
|
public int SortNo { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "Longitude_NR", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public double? Longitude { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "Latitude_NR", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public double? Latitude { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "Type_CD", DefaultValue = "T", IsNullable = true)]
|
||||||
|
public string TypeCD { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "City_CD", IsNullable = true)]
|
||||||
|
public string CityCD { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "AreaControlMode")]
|
||||||
|
public string AreaControlMode { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "AreaType", DefaultValue = "S")]
|
||||||
|
public string AreaType { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "TimeZone_CD", IsNullable = true)]
|
||||||
|
public string TimeZone { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "LightBaseOfflineMins", DefaultValue = "180", IsNullable = true)]
|
||||||
|
public int LightBaseOfflineMins { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "GatewayBaseOfflineMins", DefaultValue = "15", IsNullable = true)]
|
||||||
|
public int GatewayBaseOfflineMins { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "WJBaseOfflineMins", DefaultValue = "263520", IsNullable = true)]
|
||||||
|
public int WJBaseOfflineMins { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "NoLightPowerUpper", DefaultValue = "5", IsNullable = true)]
|
||||||
|
public double NoLightPowerUpper { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "NoLightDimmingLower", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public double NoLightDimmingLower { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "LightFaultPowerUpper", DefaultValue = "10", IsNullable = true)]
|
||||||
|
public double LightFaultPowerUpper { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "LightFaultDimmingLower", DefaultValue = "30", IsNullable = true)]
|
||||||
|
public double LightFaultDimmingLower { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "LightTFExCurrentUpper", DefaultValue = "50", IsNullable = true)]
|
||||||
|
public double LightTFExCurrentUpper { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "mins", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public int? Mins { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SunriseTime", IsNullable = true)]
|
||||||
|
public DateTime? SunriseTime { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SunsetTime", IsNullable = true)]
|
||||||
|
public DateTime? SunsetTime { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SunriseTimeString", DefaultValue = "07:00", IsNullable = true)]
|
||||||
|
public string SunriseTimeString { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SunsetTimeString", DefaultValue = "18:00", IsNullable = true)]
|
||||||
|
public string SunsetTimeString { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "SyncSunTime", DefaultValue = "1", IsNullable = true)]
|
||||||
|
public int? SyncSunTime { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "UseSunTime", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public int? UseSunTime { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "Power24", DefaultValue = "0", IsNullable = true)]
|
||||||
|
public int? Power24 { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "PowerOnTimeString", DefaultValue = "18:00", IsNullable = true)]
|
||||||
|
public string PowerOnTimeString { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "PowerOffTimeString", DefaultValue = "07:00", IsNullable = true)]
|
||||||
|
public string PowerOffTimeString { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CodeFloatddfa1a2
|
public class CodeFloatddfa1a2
|
||||||
{
|
{
|
||||||
public DateTimeOffset xx { get; set; }
|
public DateTimeOffset xx { get; set; }
|
||||||
|
Loading…
Reference in New Issue
Block a user