You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
961 B

2 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using SqlSugar;
  7. using System.Linq.Expressions;
  8. namespace OrmTest.Models
  9. {
  10. [SugarTable("STudent")]
  11. public class Student
  12. {
  13. [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")]
  14. public int Id { get; set; }
  15. public int? SchoolId { get; set; }
  16. public string Name { get; set; }
  17. public DateTime? CreateTime { get; set; }
  18. [SugarColumn(IsIgnore=true)]
  19. public int TestId { get; set; }
  20. }
  21. public class StudentTest
  22. {
  23. [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")]
  24. public int Id { get; set; }
  25. public int? SchoolId { get; set; }
  26. public string Name { get; set; }
  27. public DateTime? CreateTime { get; set; }
  28. [SugarColumn(IsIgnore = true)]
  29. public int TestId { get; set; }
  30. }
  31. }