mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add unit test
This commit is contained in:
parent
d34fac2e2a
commit
3e71fb84a5
@ -40,6 +40,7 @@ namespace OrmTest
|
|||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SugarTable("Teacherdsfafafa")]
|
||||||
public class Teacher
|
public class Teacher
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
@ -56,13 +57,16 @@ namespace OrmTest
|
|||||||
|
|
||||||
public List<ClassRoomView> ClassRoom { get; set; }
|
public List<ClassRoomView> ClassRoom { get; set; }
|
||||||
}
|
}
|
||||||
|
[SugarTable("ClassRoomfafafa")]
|
||||||
public class ClassRoom
|
public class ClassRoom
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
[Navigate(NavigateType.OneToMany,nameof(Student.ClassId),nameof(StudentClass.ClassId))]
|
||||||
|
|
||||||
|
public List<Student> Students { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClassRoomView
|
public class ClassRoomView
|
||||||
@ -71,8 +75,10 @@ namespace OrmTest
|
|||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool HasStudent { get; set; }
|
public bool HasStudent { get; set; }
|
||||||
}
|
|
||||||
|
|
||||||
|
public List<Student> Students { get; set; }
|
||||||
|
}
|
||||||
|
[SugarTable("TeacherClassfafafa")]
|
||||||
public class TeacherClass
|
public class TeacherClass
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
@ -82,7 +88,7 @@ namespace OrmTest
|
|||||||
|
|
||||||
public int ClassRoomId { get; set; }
|
public int ClassRoomId { get; set; }
|
||||||
}
|
}
|
||||||
|
[SugarTable("StarClassfafafa")]
|
||||||
public class StarClass
|
public class StarClass
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
@ -90,7 +96,7 @@ namespace OrmTest
|
|||||||
|
|
||||||
public int ClassId { get; set; }
|
public int ClassId { get; set; }
|
||||||
}
|
}
|
||||||
|
[SugarTable("Studentfafafa")]
|
||||||
public class Student
|
public class Student
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
@ -98,7 +104,7 @@ namespace OrmTest
|
|||||||
|
|
||||||
public int ClassId { get; set; }
|
public int ClassId { get; set; }
|
||||||
}
|
}
|
||||||
|
[SugarTable("StudentClassfafafa")]
|
||||||
public class StudentClass
|
public class StudentClass
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user