-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
295 changed files
with
9,286 additions
and
6,893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.AspNetCore.Mvc.ApiExplorer; | ||
using Microsoft.Extensions.Options; | ||
using Swashbuckle.AspNetCore.SwaggerGen; | ||
|
||
namespace CubeDemo; | ||
|
||
public class SwaggerConfigureOptions : IConfigureOptions<SwaggerGenOptions> | ||
{ | ||
private readonly IApiDescriptionGroupCollectionProvider provider; | ||
|
||
public SwaggerConfigureOptions(IApiDescriptionGroupCollectionProvider provider) => this.provider = provider; | ||
|
||
public void Configure(SwaggerGenOptions options) | ||
{ | ||
foreach (var description in provider.ApiDescriptionGroups.Items) | ||
{ | ||
options.SwaggerDoc(description.GroupName ?? "v1", null); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.ComponentModel; | ||
using Microsoft.AspNetCore.Mvc; | ||
using NewLife.Cube; | ||
using NewLife.School.Entity; | ||
using NewLife.Web; | ||
|
||
namespace CubeDemo.Areas.School.Controllers | ||
namespace CubeDemo.Areas.School.Controllers; | ||
|
||
[SchoolArea] | ||
[DisplayName("学生")] | ||
public class StudentController : EntityController<Student, StudentModel> | ||
{ | ||
[SchoolArea] | ||
[DisplayName("学生")] | ||
public class StudentController : EntityController<Student> | ||
static StudentController() | ||
{ | ||
static StudentController() | ||
{ | ||
ListFields.RemoveField("CreateUserID"); | ||
ListFields.RemoveField("UpdateUserID"); | ||
//FormFields | ||
} | ||
ListFields.RemoveField("CreateUserID"); | ||
ListFields.RemoveField("UpdateUserID"); | ||
//FormFields | ||
} | ||
|
||
protected override Student Find(Object key) | ||
{ | ||
return base.Find(key); | ||
} | ||
protected override Student Find(Object key) | ||
{ | ||
return base.Find(key); | ||
} | ||
|
||
protected override IEnumerable<Student> Search(Pager p) | ||
{ | ||
return base.Search(p); | ||
var classid = p["classid"].ToInt(); | ||
return Student.Search(null,p); | ||
} | ||
protected override IEnumerable<Student> Search(Pager p) | ||
{ | ||
return base.Search(p); | ||
//var classid = p["classid"].ToInt(); | ||
//return Student.Search(null,p); | ||
} | ||
|
||
public override ActionResult Index(Pager p = null) | ||
{ | ||
return base.Index(p); | ||
} | ||
public override ActionResult Index(Pager p = null) | ||
{ | ||
return base.Index(p); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
CubeDemoNC/Areas/School/Models/Entity/Interfaces/IClass.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Runtime.Serialization; | ||
using System.Web.Script.Serialization; | ||
using System.Xml.Serialization; | ||
|
||
namespace NewLife.School.Entity; | ||
|
||
/// <summary>班级</summary> | ||
public partial interface IClass | ||
{ | ||
#region 属性 | ||
/// <summary>编号</summary> | ||
Int32 Id { get; set; } | ||
|
||
/// <summary>租户</summary> | ||
Int32 TenantId { get; set; } | ||
|
||
/// <summary>名称</summary> | ||
String Name { get; set; } | ||
|
||
/// <summary>启用</summary> | ||
Boolean Enable { get; set; } | ||
|
||
/// <summary>毕业时间</summary> | ||
DateTime GraduationDate { get; set; } | ||
|
||
/// <summary>创建者</summary> | ||
Int32 CreateUserID { get; set; } | ||
|
||
/// <summary>创建时间</summary> | ||
DateTime CreateTime { get; set; } | ||
|
||
/// <summary>创建地址</summary> | ||
String CreateIP { get; set; } | ||
|
||
/// <summary>更新者</summary> | ||
Int32 UpdateUserID { get; set; } | ||
|
||
/// <summary>更新时间</summary> | ||
DateTime UpdateTime { get; set; } | ||
|
||
/// <summary>更新地址</summary> | ||
String UpdateIP { get; set; } | ||
|
||
/// <summary>备注</summary> | ||
String Remark { get; set; } | ||
#endregion | ||
} |
Oops, something went wrong.