SqlSugar/Src/Asp.Net/SqlServerTest/Models/SubInsertTest.cs

109 lines
3.1 KiB
C#
Raw Normal View History

2020-10-25 18:59:46 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
2020-11-13 21:36:52 +08:00
public class RootTable0
2020-10-25 18:59:46 +08:00
{
[SqlSugar.SugarColumn(IsPrimaryKey =true,IsIdentity =true)]
public int Id { get; set; }
public string Name { get; set; }
[SqlSugar.SugarColumn(IsIgnore =true)]
2020-11-13 21:36:52 +08:00
public TwoItem TwoItem { get; set; }
2020-10-25 18:59:46 +08:00
[SqlSugar.SugarColumn(IsIgnore = true)]
2020-11-13 21:36:52 +08:00
public TwoItem2 TwoItem2 { get; set; }
2020-10-25 18:59:46 +08:00
[SqlSugar.SugarColumn(IsIgnore = true)]
2020-11-13 21:36:52 +08:00
public List<TwoItem3> TwoItem3 { get; set; }
2020-10-25 18:59:46 +08:00
}
2020-11-13 21:36:52 +08:00
public class TwoItem
2020-10-25 18:59:46 +08:00
{
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
2020-11-13 21:36:52 +08:00
public int RootId { get; set; }
2020-10-25 18:59:46 +08:00
public string Name { get; set; }
}
2020-11-13 21:36:52 +08:00
public class TwoItem2
2020-10-25 18:59:46 +08:00
{
2020-11-13 21:36:52 +08:00
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public string Id { get; set; }
public int RootId { get; set; }
[SqlSugar.SugarColumn(IsIgnore =true)]
public List<ThreeItem2> ThreeItem2 { get; set; }
}
public class TwoItem3
{
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; }
public string Name { get; set; }
public string Desc { get; set; }
2020-10-25 18:59:46 +08:00
}
2020-11-13 21:36:52 +08:00
public class ThreeItem2
2020-10-25 18:59:46 +08:00
{
2020-11-13 21:36:52 +08:00
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; }
public string Name { get; set; }
public string TwoItem2Id { get; set; }
2020-10-25 18:59:46 +08:00
}
2020-11-13 23:00:03 +08:00
public class Country
{
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; }
public string Name { get; set; }
[SqlSugar.SugarColumn(IsIgnore = true)]
public List<Province> Provinces { get; set; }
}
public class Province
{
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public int Id { get; set; }
public string Name { get; set; }
public int CountryId { get; set; }
[SqlSugar.SugarColumn(IsIgnore = true)]
public List<City> citys { get; set; }
}
public class City
{
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; }
public int ProvinceId { get; set; }
public string Name { get; set; }
}
2020-11-13 23:31:09 +08:00
public class Country1
{
[SqlSugar.SugarColumn(IsPrimaryKey = true,IsIdentity =true)]
public int Id { get; set; }
public string Name { get; set; }
[SqlSugar.SugarColumn(IsIgnore = true)]
public List<Province1> Provinces { get; set; }
}
public class Province1
{
[SqlSugar.SugarColumn(IsPrimaryKey = true,IsIdentity =true)]
public int Id { get; set; }
public string Name { get; set; }
public int CountryId { get; set; }
[SqlSugar.SugarColumn(IsIgnore = true)]
public List<City1> citys { get; set; }
}
public class City1
{
[SqlSugar.SugarColumn(IsPrimaryKey = true,IsIdentity =true)]
public int Id { get; set; }
public int ProvinceId { get; set; }
public string Name { get; set; }
}
2020-10-25 18:59:46 +08:00
}