Update questDb demo

This commit is contained in:
sunkaixuan
2022-07-31 23:51:07 +08:00
parent efff03b294
commit d446d4e4dd
8 changed files with 34 additions and 118 deletions

View File

@@ -6,9 +6,10 @@ using System.Threading.Tasks;
namespace OrmTest
{
[SqlSugar.SugarTable("Custom_1")]
public class Custom
{
public int Id { get; set; }
public long Id { get; set; }
public string Name { get; set; }
}
}

View File

@@ -6,19 +6,19 @@ using System.Text;
namespace OrmTest
{
[SugarTable("order_1")]
public class Order
{
//不支持自增和主键 (标识主键是用来更新用的)
[SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; }
public long Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
// [SugarColumn(IsNullable = true,SqlParameterDbType =System.Data.DbType.Date)]
public DateTime CreateTime { get; set; }
[SugarColumn(IsNullable =true)]
public int CustomId { get; set; }
public long CustomId { get; set; }
[SugarColumn(IsIgnore = true)]
public List<OrderItem> Items { get; set; }
}

View File

@@ -5,13 +5,13 @@ using System.Text;
namespace OrmTest
{
[SqlSugar.SugarTable("OrderDetail")]
[SqlSugar.SugarTable("OrderDetail_1")]
public class OrderItem
{
//不支持自增和主键 (标识主键是用来更新用的)
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public int ItemId { get; set; }
public int OrderId { get; set; }
public long ItemId { get; set; }
public long OrderId { get; set; }
public decimal? Price { get; set; }
[SqlSugar.SugarColumn(IsNullable = true)]
public DateTime? CreateTime { get; set; }

View File

@@ -10,12 +10,9 @@ namespace OrmTest
public class Users
{
[SugarColumn(IsPrimaryKey = true)]
public long Sid { get; set; }
public int Id { get; set; }
public long Sid { get; set; }
[SqlSugar.SugarColumn(IsNullable = true)]
public DateTime? createtime { get; set; }
public DateTime createtime { get; set; }
public string username { get; set; }
public string password { get; set; }