mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-07 06:07:59 +08:00
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
![]() |
using SqlSugar;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace OrmTest
|
|||
|
{
|
|||
|
internal class Unitadf1yaadfa
|
|||
|
{
|
|||
|
public static void Init()
|
|||
|
{
|
|||
|
var db = NewUnitTest.Db;
|
|||
|
}
|
|||
|
|
|||
|
public class UnitOrderfafaadfa
|
|||
|
{
|
|||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
|||
|
public int Id { get; set; }
|
|||
|
|
|||
|
public string Name { get; set; }
|
|||
|
public decimal Price { get; set; }
|
|||
|
[SugarColumn(IsNullable = true)]
|
|||
|
public DateTime? CreateTime { get; set; }
|
|||
|
[SugarColumn(IsNullable = true)]
|
|||
|
public int CustomId { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class UnitOrderItemafdaa
|
|||
|
{
|
|||
|
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
|||
|
public int ItemId { get; set; }
|
|||
|
public int OrderId { get; set; }
|
|||
|
public decimal? Price { get; set; }
|
|||
|
[SqlSugar.SugarColumn(IsNullable = true)]
|
|||
|
public DateTime? CreateTime { get; set; }
|
|||
|
[Navigate(NavigateType.OneToOne, nameof(OrderId))]
|
|||
|
public UnitOrderfafaadfa Order { get; set; }
|
|||
|
}
|
|||
|
}
|
|||
|
}
|