mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
7461207551
commit
a3d3b3a8ae
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -13,12 +14,13 @@ namespace OrmTest
|
||||
if (Db.DbMaintenance.IsAnyTable("UnitCodeTest1", false))
|
||||
Db.DbMaintenance.DropTable("UnitCodeTest1");
|
||||
Db.CodeFirst.InitTables<UnitCodeTest1>();
|
||||
Db.CodeFirst.InitTables<UnitCodeTest1>();
|
||||
}
|
||||
[SugarIndex("IndexUnitCodeTest1_CreateDate", nameof(CreateDate),OrderByType.Desc)]
|
||||
public class UnitCodeTest1
|
||||
{
|
||||
[SqlSugar.SugarColumn(IndexGroupNameList = new string[] { "group1" })]
|
||||
public int Id { get; set; }
|
||||
[SqlSugar.SugarColumn(DefaultValue= "now()", IndexGroupNameList =new string[] {"group1" } )]
|
||||
[SqlSugar.SugarColumn(DefaultValue= "now()" )]
|
||||
public DateTime? CreateDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user