2022-07-29 22:44:21 +08:00
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace OrmTest
|
|
|
|
|
{
|
2022-07-31 23:51:07 +08:00
|
|
|
|
[SugarTable("order_1")]
|
2022-07-29 22:44:21 +08:00
|
|
|
|
public class Order
|
|
|
|
|
{
|
2022-07-31 22:01:02 +08:00
|
|
|
|
//不支持自增和主键 (标识主键是用来更新用的)
|
|
|
|
|
[SugarColumn(IsPrimaryKey = true)]
|
2022-07-31 23:51:07 +08:00
|
|
|
|
public long Id { get; set; }
|
2022-07-29 22:44:21 +08:00
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public decimal Price { get; set; }
|
2022-07-30 17:23:53 +08:00
|
|
|
|
// [SugarColumn(IsNullable = true,SqlParameterDbType =System.Data.DbType.Date)]
|
2022-07-29 22:44:21 +08:00
|
|
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
|
[SugarColumn(IsNullable =true)]
|
2022-07-31 23:51:07 +08:00
|
|
|
|
public long CustomId { get; set; }
|
2022-08-17 11:08:43 +08:00
|
|
|
|
|
|
|
|
|
public double Value { get; set; }
|
|
|
|
|
|
2022-07-29 22:44:21 +08:00
|
|
|
|
[SugarColumn(IsIgnore = true)]
|
|
|
|
|
public List<OrderItem> Items { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|