mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Catalog arrangement
This commit is contained in:
135
Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs
Normal file
135
Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
public class DataTestInfo
|
||||
{
|
||||
public DataTestInfo(){
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public int Int1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? Int2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string String {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public decimal Decimal1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? Decimal2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public DateTime Datetime1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? Datetime2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public byte[] Image1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public byte[] Image2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public Guid Guid1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public Guid? Guid2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public decimal Money1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? Money2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public byte[] Varbinary1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public byte[] Varbinary2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public double Float1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? Float2 {get;set;}
|
||||
|
||||
}
|
||||
}
|
44
Src/Asp.Net/SqlServerTest/Models/DataTestInfo2.cs
Normal file
44
Src/Asp.Net/SqlServerTest/Models/DataTestInfo2.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
public class DataTestInfo2
|
||||
{
|
||||
public DataTestInfo2(){
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public Guid PK {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public bool Bool1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public bool? Bool2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Text1 {get;set;}
|
||||
|
||||
}
|
||||
}
|
22
Src/Asp.Net/SqlServerTest/Models/Enum.cs
Normal file
22
Src/Asp.Net/SqlServerTest/Models/Enum.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
public enum SchoolEnum
|
||||
{
|
||||
HarvardUniversity = 0,
|
||||
UniversityOfOxford = 1
|
||||
}
|
||||
public class StudentEnum
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public SchoolEnum SchoolId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
[SqlSugar.SugarColumn(IsIgnore =true)]
|
||||
public int TestId { get; set; }
|
||||
}
|
||||
}
|
17
Src/Asp.Net/SqlServerTest/Models/School.cs
Normal file
17
Src/Asp.Net/SqlServerTest/Models/School.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
public class School
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
22
Src/Asp.Net/SqlServerTest/Models/Student.cs
Normal file
22
Src/Asp.Net/SqlServerTest/Models/Student.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
[SugarTable("STudent")]
|
||||
public class Student
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")]
|
||||
public int Id { get; set; }
|
||||
public int? SchoolId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
[SugarColumn(IsIgnore=true)]
|
||||
public int TestId { get; set; }
|
||||
}
|
||||
}
|
18
Src/Asp.Net/SqlServerTest/Models/ViewModelStudent.cs
Normal file
18
Src/Asp.Net/SqlServerTest/Models/ViewModelStudent.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest.Models
|
||||
{
|
||||
public class ViewModelStudent:Student
|
||||
{
|
||||
|
||||
}
|
||||
public class ViewModelStudent2
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Student Student { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user