SqlSugar/Src/Asp.Net/MySqlTest/Models/Order.cs

26 lines
713 B
C#
Raw Normal View History

2019-06-04 13:22:37 +08:00
using SqlSugar;
using System;
2019-05-22 20:42:46 +08:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OrmTest
{
2022-12-05 18:03:46 +08:00
[SugarIndex("id_order_name", nameof(Order.Name), OrderByType.Asc)]
2019-05-22 20:42:46 +08:00
public class Order
{
2022-12-05 18:03:46 +08:00
2022-10-26 10:56:47 +08:00
[SugarColumn(IsPrimaryKey = true, IsIdentity = true,ColumnDescription ="主键")]
2019-05-22 20:42:46 +08:00
public int Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
2023-06-27 15:17:24 +08:00
[SugarColumn(IsNullable = true)]
2019-05-22 20:42:46 +08:00
public DateTime CreateTime { get; set; }
2019-06-04 13:22:37 +08:00
[SugarColumn(IsNullable =true)]
2019-05-22 20:42:46 +08:00
public int CustomId { get; set; }
2019-06-04 13:22:37 +08:00
[SugarColumn(IsIgnore = true)]
public List<OrderItem> Items { get; set; }
2019-05-22 20:42:46 +08:00
}
}