From 62f61691d4edf274da3936b57db3b90051f77d28 Mon Sep 17 00:00:00 2001 From: snow Date: Thu, 5 Feb 2026 11:04:35 +0800 Subject: [PATCH 1/6] announcement api --- .github/copilot-instructions.md | 55 + .../AnnouncementCategoryCreateDto.cs | 5 + .../AnnouncementCategoryCreateDtoValidator.cs | 13 + ...nouncementCategoryCreateOrUpdateDtoBase.cs | 10 + ...tCategoryCreateOrUpdateDtoBaseValidator.cs | 23 + .../AnnouncementCategoryDetailDto.cs | 13 + .../AnnouncementCategoryListDto.cs | 13 + .../AnnouncementCategoryUpdateDto.cs | 5 + .../AnnouncementCategoryUpdateDtoValidator.cs | 13 + .../Announcements/AnnouncementCreateDto.cs | 20 + .../AnnouncementCreateDtoValidator.cs | 13 + ...ouncementCreateOrUpdateDtoBaseValidator.cs | 30 + .../Announcements/AnnouncementDetailDto.cs | 50 + .../Announcements/AnnouncementListDto.cs | 50 + .../Announcements/AnnouncementUpdateDto.cs | 5 + .../AnnouncementUpdateDtoValidator.cs | 13 + .../Announcements/GetAnnouncementsInput.cs | 13 + .../IAnnouncementAdminAppService.cs | 48 + .../IAnnouncementCategoryAdminAppService.cs | 37 + .../AnnouncementAdminAppService.cs | 100 + .../AnnouncementCategoryAdminAppService.cs | 64 + .../ExamApplicationAdminAutoMapperProfile.cs | 8 + .../AnnouncementAdminController.cs | 62 + .../AnnouncementCategoryAdminController.cs | 45 + .../ExamPermissionDefinitionProvider.cs | 12 + .../Permissions/ExamPermissions.cs | 18 + .../Announcements/AnnouncementCategoryDto.cs | 34 + .../Announcements/AnnouncementDto.cs | 30 + .../Announcements/IAnnouncementAppService.cs | 23 + .../IAnnouncementCategoryAppService.cs | 22 + .../Announcements/AnnouncementAppService.cs | 42 + .../AnnouncementCategoryAppService.cs | 33 + .../ExamApplicationAutoMapper.cs | 5 + .../AnnouncementCategoryConsts.cs | 8 + .../Announcements/AnnouncementConsts.cs | 9 + .../Announcements/Announcement.cs | 114 + .../Announcements/AnnouncementCategory.cs | 50 + .../IAnnouncementCategoryRepository.cs | 11 + .../Announcements/IAnnouncementRepository.cs | 41 + .../AnnouncementCategoryRepository.cs | 18 + .../Announcements/AnnouncementRepository.cs | 81 + .../EntityFrameworkCore/ExamDbContext.cs | 25 + .../ExamEntityFrameworkCoreModule.cs | 17 +- .../EntityFrameworkCore/IExamDbContext.cs | 3 + .../Questions/QuestionRepository.cs | 2 + ...20260205030312_AddAnnouncement.Designer.cs | 3348 +++++++++++++++++ .../20260205030312_AddAnnouncement.cs | 87 + .../Migrations/ExamDbContextModelSnapshot.cs | 347 +- .../AnnouncementCategoryController.cs | 33 + .../Announcements/AnnouncementController.cs | 33 + .../AnnouncementAdminAppServiceTests.cs | 105 + .../AnnouncementAppServiceTests.cs | 46 + ...nnouncementCategoryAdminAppServiceTests.cs | 80 + .../AnnouncementCategoryAppServiceTests.cs | 35 + .../EfCoreAnnouncementAdminAppServiceTests.cs | 10 + ...nnouncementCategoryAdminAppServiceTests.cs | 10 + .../ExamDbContextInUnitTest.cs | 26 + .../SuperAbp.Exam.TestBase/ExamTestData.cs | 20 + .../ExamTestDataBuilder.cs | 55 + 59 files changed, 5446 insertions(+), 95 deletions(-) create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDtoValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBase.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBaseValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryDetailDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDtoValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/GetAnnouncementsInput.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementAdminAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementCategoryAdminAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementCategoryAdminAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementCategoryAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementCategoryAppService.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementCategoryConsts.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementCategory.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementCategoryRepository.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementRepository.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementCategoryRepository.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.Designer.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAdminAppServiceTests.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAppServiceTests.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementAdminAppServiceTests.cs create mode 100644 aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementCategoryAdminAppServiceTests.cs diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3ca934b1..f3fabf40 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -348,3 +348,58 @@ Frontend builds to: - Supported languages configured in `ExamDomainModule.cs` - Frontend i18n files in `angular-admin/src/assets/i18n/` - Backend localization in standard ABP `.json` resource files + +## AI Assistant Behavior Guidelines + +When helping complete features in this codebase: + +1. **Minimal Documentation** - Only include: + - ✅ Brief comments explaining complex logic + - ✅ Class/method summaries for public APIs + + Do NOT generate: + - ❌ README files + - ❌ Line-by-line comments + - ❌ Installation/setup guides + - ❌ Feature description documents + - ❌ Inline XML documentation strings + +2. **Focus on Code** - Provide: + - Working implementation code + - Clean, self-explanatory code + - Refactoring suggestions if asked + +3. **Assume Knowledge** - User is familiar with: + - ABP Framework patterns + - Project structure and conventions + - Domain-driven design concepts + - Testing patterns + +**Example Response Format:** +```typescript +// ✅ Good: Brief comment for complex logic +export class MyComponent { + constructor(private myService: MyService) { + this.myService = myService; + } + + async loadData() { + this.data = await this.myService.getData(); + } +} + +// ❌ Bad: Line-by-line comments +export class MyComponent { + // Constructor injection + constructor(private myService: MyService) { + // Assign to property + this.myService = myService; + } + + // Load data method + async loadData() { + // Call service and assign + this.data = await this.myService.getData(); + } +} +``` diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDto.cs new file mode 100644 index 00000000..4e9bf498 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDto.cs @@ -0,0 +1,5 @@ +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryCreateDto : AnnouncementCategoryCreateOrUpdateDtoBase +{ +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDtoValidator.cs new file mode 100644 index 00000000..db925ef4 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateDtoValidator.cs @@ -0,0 +1,13 @@ +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryCreateDtoValidator : AbstractValidator +{ + public AnnouncementCategoryCreateDtoValidator(IStringLocalizer local) + { + Include(new AnnouncementCategoryCreateOrUpdateDtoBaseValidator(local)); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBase.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBase.cs new file mode 100644 index 00000000..1348c3dc --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBase.cs @@ -0,0 +1,10 @@ +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryCreateOrUpdateDtoBase +{ + public string Name { get; set; } + + public int Sort { get; set; } + + public string? Remark { get; set; } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBaseValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBaseValidator.cs new file mode 100644 index 00000000..574520f1 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryCreateOrUpdateDtoBaseValidator.cs @@ -0,0 +1,23 @@ +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Announcements; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryCreateOrUpdateDtoBaseValidator : AbstractValidator +{ + public AnnouncementCategoryCreateOrUpdateDtoBaseValidator(IStringLocalizer local) + { + RuleFor(x => x.Name) + .NotEmpty() + .WithMessage(local["The {0} field is required.", "{PropertyName}"]) + .MaximumLength(AnnouncementCategoryConsts.MaxNameLength) + .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementCategoryConsts.MaxNameLength]); + + RuleFor(x => x.Remark) + .MaximumLength(AnnouncementCategoryConsts.MaxRemarkLength) + .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementCategoryConsts.MaxRemarkLength]) + .When(x => x.Remark != null); + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryDetailDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryDetailDto.cs new file mode 100644 index 00000000..4f60a423 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryDetailDto.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryDetailDto : FullAuditedEntityDto +{ + public string Name { get; set; } + + public int Sort { get; set; } + + public string? Remark { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs new file mode 100644 index 00000000..b64ce01e --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryListDto : FullAuditedEntityDto +{ + public string Name { get; set; } + + public int DisplayOrder { get; set; } + + public string? Remark { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDto.cs new file mode 100644 index 00000000..3e449e10 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDto.cs @@ -0,0 +1,5 @@ +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryUpdateDto : AnnouncementCategoryCreateOrUpdateDtoBase +{ +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDtoValidator.cs new file mode 100644 index 00000000..8eaf1551 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryUpdateDtoValidator.cs @@ -0,0 +1,13 @@ +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCategoryUpdateDtoValidator : AbstractValidator +{ + public AnnouncementCategoryUpdateDtoValidator(IStringLocalizer local) + { + Include(new AnnouncementCategoryCreateOrUpdateDtoBaseValidator(local)); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs new file mode 100644 index 00000000..f3b96b77 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs @@ -0,0 +1,20 @@ +using System; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCreateOrUpdateDtoBase +{ + public string Title { get; set; } + + public string Content { get; set; } + + public DateTime? ExpirationTime { get; set; } + + public int Sort { get; set; } + + public Guid? CategoryId { get; set; } +} + +public class AnnouncementCreateDto : AnnouncementCreateOrUpdateDtoBase +{ +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs new file mode 100644 index 00000000..43c0dbce --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs @@ -0,0 +1,13 @@ +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCreateDtoValidator : AbstractValidator +{ + public AnnouncementCreateDtoValidator(IStringLocalizer local) + { + Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local)); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs new file mode 100644 index 00000000..cfc4b2b0 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs @@ -0,0 +1,30 @@ +using System; +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Announcements; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCreateOrUpdateDtoBaseValidator : AbstractValidator +{ + public AnnouncementCreateOrUpdateDtoBaseValidator(IStringLocalizer local) + { + RuleFor(x => x.Title) + .NotEmpty() + .WithMessage(local["The {0} field is required.", "{PropertyName}"]) + .MaximumLength(AnnouncementConsts.MaxTitleLength) + .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementConsts.MaxTitleLength]); + + RuleFor(x => x.Content) + .NotEmpty() + .WithMessage(local["The {0} field is required.", "{PropertyName}"]) + .MaximumLength(AnnouncementConsts.MaxContentLength) + .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementConsts.MaxContentLength]); + + RuleFor(x => x.ExpirationTime) + .Must((dto, expirationTime) => !expirationTime.HasValue || expirationTime.Value > DateTime.Now) + .WithMessage(local["Expiration time must be in the future."]) + .When(x => x.ExpirationTime.HasValue); + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs new file mode 100644 index 00000000..acf9c46c --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs @@ -0,0 +1,50 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Admin.Announcements; + +/// +/// 公告 +/// +public class AnnouncementDetailDto : FullAuditedEntityDto +{ + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 内容 + /// + public string Content { get; set; } + + /// + /// 发布时间 + /// + public DateTime? PublishTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime? ExpirationTime { get; set; } + + /// + /// 是否发布 + /// + public bool IsPublished { get; set; } + + /// + /// 显示顺序 + /// + public int Sort { get; set; } + + /// + /// 分类ID + /// + public Guid? CategoryId { get; set; } + + /// + /// 分类名称 + /// + public string? CategoryName { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs new file mode 100644 index 00000000..00c9c824 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs @@ -0,0 +1,50 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Admin.Announcements; + +/// +/// 公告 +/// +public class AnnouncementListDto : FullAuditedEntityDto +{ + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 内容 + /// + public string Content { get; set; } + + /// + /// 发布时间 + /// + public DateTime? PublishTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime? ExpirationTime { get; set; } + + /// + /// 是否发布 + /// + public bool IsPublished { get; set; } + + /// + /// 显示顺序 + /// + public int DisplayOrder { get; set; } + + /// + /// 分类ID + /// + public Guid? CategoryId { get; set; } + + /// + /// 分类名称 + /// + public string? CategoryName { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDto.cs new file mode 100644 index 00000000..25a62d4b --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDto.cs @@ -0,0 +1,5 @@ +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementUpdateDto : AnnouncementCreateOrUpdateDtoBase +{ +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs new file mode 100644 index 00000000..fa9c5c53 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs @@ -0,0 +1,13 @@ +using FluentValidation; +using Microsoft.Extensions.Localization; +using SuperAbp.Exam.Localization; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementUpdateDtoValidator : AbstractValidator +{ + public AnnouncementUpdateDtoValidator(IStringLocalizer local) + { + Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local)); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/GetAnnouncementsInput.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/GetAnnouncementsInput.cs new file mode 100644 index 00000000..37e75959 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/GetAnnouncementsInput.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class GetAnnouncementsInput : PagedAndSortedResultRequestDto +{ + public string? Title { get; set; } + + public Guid? CategoryId { get; set; } + + public bool? IsPublished { get; set; } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementAdminAppService.cs new file mode 100644 index 00000000..3594018d --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementAdminAppService.cs @@ -0,0 +1,48 @@ +using System; +using System.Threading.Tasks; +using SuperAbp.Exam.Admin.Announcements; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Admin.Announcements; + +/// +/// 公告管理 +/// +public interface IAnnouncementAdminAppService : IApplicationService +{ + /// + /// 获取详情 + /// + Task GetAsync(Guid id); + + /// + /// 获取列表 + /// + Task> GetListAsync(GetAnnouncementsInput input); + + /// + /// 创建 + /// + Task CreateAsync(AnnouncementCreateDto input); + + /// + /// 更新 + /// + Task UpdateAsync(Guid id, AnnouncementUpdateDto input); + + /// + /// 发布 + /// + Task PublishAsync(Guid id); + + /// + /// 下架 + /// + Task UnpublishAsync(Guid id); + + /// + /// 删除 + /// + Task DeleteAsync(Guid id); +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementCategoryAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementCategoryAdminAppService.cs new file mode 100644 index 00000000..1f9fd36b --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/IAnnouncementCategoryAdminAppService.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Admin.Announcements; + +/// +/// 公告分类管理 +/// +public interface IAnnouncementCategoryAdminAppService : IApplicationService +{ + /// + /// 获取详情 + /// + Task GetAsync(Guid id); + + /// + /// 获取列表 + /// + Task> GetListAsync(); + + /// + /// 创建 + /// + Task CreateAsync(AnnouncementCategoryCreateDto input); + + /// + /// 更新 + /// + Task UpdateAsync(Guid id, AnnouncementCategoryUpdateDto input); + + /// + /// 删除 + /// + Task DeleteAsync(Guid id); +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs new file mode 100644 index 00000000..ff90dedc --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs @@ -0,0 +1,100 @@ +using Microsoft.AspNetCore.Authorization; +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Announcements; +using SuperAbp.Exam.Permissions; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Admin.Announcements; + +[Authorize(ExamPermissions.Announcements.Default)] +public class AnnouncementAdminAppService( + IAnnouncementRepository repository, + IAnnouncementCategoryRepository categoryRepository) : ApplicationService, IAnnouncementAdminAppService +{ + protected IAnnouncementRepository Repository { get; } = repository; + protected IAnnouncementCategoryRepository CategoryRepository { get; } = categoryRepository; + + public virtual async Task GetAsync(Guid id) + { + var announcement = await Repository.GetAsync(id); + return ObjectMapper.Map(announcement); + } + + public virtual async Task> GetListAsync(GetAnnouncementsInput input) + { + var totalCount = await Repository.GetCountAsync( + input.Title, + input.CategoryId, + input.IsPublished + ); + + var items = await Repository.GetListAsync( + input.Sorting, + input.SkipCount, + input.MaxResultCount, + input.Title, + input.CategoryId, + input.IsPublished + ); + + return new PagedResultDto( + totalCount, + ObjectMapper.Map, List>(items) + ); + } + + [Authorize(ExamPermissions.Announcements.Create)] + public virtual async Task CreateAsync(AnnouncementCreateDto input) + { + var announcement = new Announcement( + GuidGenerator.Create(), + input.Title, + input.Content, + input.Sort, + input.CategoryId + ); + + await Repository.InsertAsync(announcement); + return ObjectMapper.Map(announcement); + } + + [Authorize(ExamPermissions.Announcements.Update)] + public virtual async Task UpdateAsync(Guid id, AnnouncementUpdateDto input) + { + var announcement = await Repository.GetAsync(id); + + announcement.Title = input.Title; + announcement.Content = input.Content; + announcement.Sort = input.Sort; + announcement.CategoryId = input.CategoryId; + + await Repository.UpdateAsync(announcement); + return ObjectMapper.Map(announcement); + } + + [Authorize(ExamPermissions.Announcements.Publish)] + public virtual async Task PublishAsync(Guid id) + { + var announcement = await Repository.GetAsync(id); + announcement.Publish(Clock.Now); + await Repository.UpdateAsync(announcement); + } + + [Authorize(ExamPermissions.Announcements.Unpublish)] + public virtual async Task UnpublishAsync(Guid id) + { + var announcement = await Repository.GetAsync(id); + announcement.Unpublish(); + await Repository.UpdateAsync(announcement); + } + + [Authorize(ExamPermissions.Announcements.Delete)] + public virtual async Task DeleteAsync(Guid id) + { + await Repository.DeleteAsync(id); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementCategoryAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementCategoryAdminAppService.cs new file mode 100644 index 00000000..36f2efba --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementCategoryAdminAppService.cs @@ -0,0 +1,64 @@ +using Microsoft.AspNetCore.Authorization; +using SuperAbp.Exam.Announcements; +using SuperAbp.Exam.Permissions; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Admin.Announcements; + +[Authorize(ExamPermissions.AnnouncementCategories.Default)] +public class AnnouncementCategoryAdminAppService(IAnnouncementCategoryRepository repository) : ApplicationService, IAnnouncementCategoryAdminAppService +{ + protected IAnnouncementCategoryRepository Rpository { get; } = repository; + + public virtual async Task GetAsync(Guid id) + { + var category = await Rpository.GetAsync(id); + return ObjectMapper.Map(category); + } + + public virtual async Task> GetListAsync() + { + var categories = await Rpository.GetListAsync(); + + return new ListResultDto( + ObjectMapper.Map, List>(categories) + ); + } + + [Authorize(ExamPermissions.AnnouncementCategories.Create)] + public virtual async Task CreateAsync(AnnouncementCategoryCreateDto input) + { + var category = new AnnouncementCategory( + GuidGenerator.Create(), + input.Name, + input.Sort, + input.Remark + ); + + await Rpository.InsertAsync(category); + return ObjectMapper.Map(category); + } + + [Authorize(ExamPermissions.AnnouncementCategories.Update)] + public virtual async Task UpdateAsync(Guid id, AnnouncementCategoryUpdateDto input) + { + var category = await Rpository.GetAsync(id); + + category.Name = input.Name; + category.Sort = input.Sort; + category.Remark = input.Remark; + + await Rpository.UpdateAsync(category); + return ObjectMapper.Map(category); + } + + [Authorize(ExamPermissions.AnnouncementCategories.Delete)] + public virtual async Task DeleteAsync(Guid id) + { + await Rpository.DeleteAsync(id); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs index 738cbb58..f3d1bb15 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs @@ -1,4 +1,6 @@ using AutoMapper; +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Announcements; namespace SuperAbp.Exam.Admin; @@ -9,5 +11,11 @@ public ExamApplicationAdminAutoMapperProfile() /* You can configure your Volo.Abp.AutoMapper mapping configuration here. * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ + CreateMap() + .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); + CreateMap() + .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); + CreateMap(); + CreateMap(); } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs new file mode 100644 index 00000000..a6a4afc3 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs @@ -0,0 +1,62 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using SuperAbp.Exam.Admin.Announcements; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace SuperAbp.Exam.Admin.Controllers; + +[Route("api/announcements")] +public class AnnouncementAdminController : AbpController, IAnnouncementAdminAppService +{ + private readonly IAnnouncementAdminAppService _announcementAppService; + + public AnnouncementAdminController(IAnnouncementAdminAppService announcementAppService) + { + _announcementAppService = announcementAppService; + } + + [HttpGet("{id}")] + public async Task GetAsync(Guid id) + { + return await _announcementAppService.GetAsync(id); + } + + [HttpGet] + public async Task> GetListAsync(GetAnnouncementsInput input) + { + return await _announcementAppService.GetListAsync(input); + } + + [HttpPost] + public async Task CreateAsync(AnnouncementCreateDto input) + { + return await _announcementAppService.CreateAsync(input); + } + + [HttpPut("{id}")] + public async Task UpdateAsync(Guid id, AnnouncementUpdateDto input) + { + return await _announcementAppService.UpdateAsync(id, input); + } + + [HttpPatch("{id}/publish")] + public async Task PublishAsync(Guid id) + { + await _announcementAppService.PublishAsync(id); + } + + [HttpPatch("{id}/unpublish")] + public async Task UnpublishAsync(Guid id) + { + await _announcementAppService.UnpublishAsync(id); + } + + [HttpDelete("{id}")] + public async Task DeleteAsync(Guid id) + { + await _announcementAppService.DeleteAsync(id); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs new file mode 100644 index 00000000..308dd2a8 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs @@ -0,0 +1,45 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using SuperAbp.Exam.Admin.Announcements; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace SuperAbp.Exam.Admin.Controllers; + +[Route("api/announcement-categories")] +public class AnnouncementCategoryAdminController(IAnnouncementCategoryAdminAppService categoryAppService) : AbpController, IAnnouncementCategoryAdminAppService +{ + protected IAnnouncementCategoryAdminAppService CategoryAppService { get; } = categoryAppService; + + [HttpGet("{id}")] + public virtual async Task GetAsync(Guid id) + { + return await CategoryAppService.GetAsync(id); + } + + [HttpGet] + public virtual async Task> GetListAsync() + { + return await CategoryAppService.GetListAsync(); + } + + [HttpPost] + public virtual async Task CreateAsync(AnnouncementCategoryCreateDto input) + { + return await CategoryAppService.CreateAsync(input); + } + + [HttpPut("{id}")] + public virtual async Task UpdateAsync(Guid id, AnnouncementCategoryUpdateDto input) + { + return await CategoryAppService.UpdateAsync(id, input); + } + + [HttpDelete("{id}")] + public virtual async Task DeleteAsync(Guid id) + { + await CategoryAppService.DeleteAsync(id); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs index f1a215bd..9734e933 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs @@ -49,6 +49,18 @@ public override void Define(IPermissionDefinitionContext context) exams.AddChild(ExamPermissions.Exams.Cancel, L("Permission:Cancel")); exams.AddChild(ExamPermissions.Exams.Invalidate, L("Permission:Invalidate")); exams.AddChild(ExamPermissions.Exams.Delete, L("Permission:Delete")); + + var announcements = myGroup.AddPermission(ExamPermissions.Announcements.Default, L("Permission:Announcements")); + exams.AddChild(ExamPermissions.Announcements.Create, L("Permission:Create")); + exams.AddChild(ExamPermissions.Announcements.Update, L("Permission:Edit")); + exams.AddChild(ExamPermissions.Announcements.Publish, L("Permission:Publish")); + exams.AddChild(ExamPermissions.Announcements.Unpublish, L("Permission:Unpublish")); + exams.AddChild(ExamPermissions.Announcements.Delete, L("Permission:Delete")); + + var announcementCategories = myGroup.AddPermission(ExamPermissions.AnnouncementCategories.Default, L("Permission:AnnouncementCategories")); + exams.AddChild(ExamPermissions.AnnouncementCategories.Create, L("Permission:Create")); + exams.AddChild(ExamPermissions.AnnouncementCategories.Update, L("Permission:Edit")); + exams.AddChild(ExamPermissions.AnnouncementCategories.Delete, L("Permission:Delete")); } private static LocalizableString L(string name) diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissions.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissions.cs index 984a1d22..43522051 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissions.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissions.cs @@ -60,4 +60,22 @@ public static class Exams public const string Invalidate = Default + ".Invalidate"; public const string Delete = Default + ".Delete"; } + + public static class Announcements + { + public const string Default = GroupName + ".Announcements"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Publish = Default + ".Publish"; + public const string Unpublish = Default + ".Unpublish"; + public const string Delete = Default + ".Delete"; + } + + public static class AnnouncementCategories + { + public const string Default = GroupName + ".AnnouncementCategories"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Delete = Default + ".Delete"; + } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs new file mode 100644 index 00000000..b1d8de03 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs @@ -0,0 +1,34 @@ +using System; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告分类 DTO +/// +public class AnnouncementCategoryDto +{ + /// + /// 主键 + /// + public Guid Id { get; set; } + + /// + /// 分类名称 + /// + public string Name { get; set; } + + /// + /// 显示顺序 + /// + public int DisplayOrder { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs new file mode 100644 index 00000000..4877f647 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs @@ -0,0 +1,30 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告(用户端) +/// +public class AnnouncementDto : EntityDto +{ + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 内容 + /// + public string Content { get; set; } + + /// + /// 分类ID + /// + public Guid? CategoryId { get; set; } + + /// + /// 分类名称 + /// + public string? CategoryName { get; set; } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs new file mode 100644 index 00000000..3b044cb0 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告查询 +/// +public interface IAnnouncementAppService : IApplicationService +{ + /// + /// 详情 + /// + Task GetAsync(Guid id); + + /// + /// 列表 + /// + Task> GetEffectiveListAsync(Guid? categoryId = null); +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementCategoryAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementCategoryAppService.cs new file mode 100644 index 00000000..9daae547 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementCategoryAppService.cs @@ -0,0 +1,22 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告分类查询 +/// +public interface IAnnouncementCategoryAppService : IApplicationService +{ + /// + /// 详情 + /// + Task GetAsync(Guid id); + + /// + /// 列表 + /// + Task> GetListAsync(); +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs new file mode 100644 index 00000000..1e4cd41b --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp; + +namespace SuperAbp.Exam.Announcements; + +public class AnnouncementAppService : ApplicationService, IAnnouncementAppService +{ + private readonly IAnnouncementRepository _repository; + + public AnnouncementAppService(IAnnouncementRepository repository) + { + _repository = repository; + } + + public virtual async Task GetAsync(Guid id) + { + var announcement = await _repository.GetAsync(id); + + if (!announcement.IsEffective(Clock.Now)) + { + throw new BusinessException("Announcement not found or not effective"); + } + + return ObjectMapper.Map(announcement); + } + + public virtual async Task> GetEffectiveListAsync(Guid? categoryId = null) + { + var items = categoryId.HasValue + ? await _repository.GetEffectiveListByCategoryIdAsync(categoryId.Value, Clock.Now) + : await _repository.GetEffectiveListAsync(Clock.Now); + + var dtos = ObjectMapper.Map, List>(items); + + return new ListResultDto(dtos); + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementCategoryAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementCategoryAppService.cs new file mode 100644 index 00000000..472a1941 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementCategoryAppService.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace SuperAbp.Exam.Announcements; + +public class AnnouncementCategoryAppService : ApplicationService, IAnnouncementCategoryAppService +{ + private readonly IAnnouncementCategoryRepository _repository; + + public AnnouncementCategoryAppService(IAnnouncementCategoryRepository repository) + { + _repository = repository; + } + + public virtual async Task GetAsync(Guid id) + { + var category = await _repository.GetAsync(id); + return ObjectMapper.Map(category); + } + + public virtual async Task> GetListAsync() + { + var categories = await _repository.GetListAsync(); + + return new ListResultDto( + ObjectMapper.Map, List>(categories) + ); + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs b/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs index f32def8e..ff3044c5 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs @@ -1,4 +1,5 @@ using AutoMapper; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.Favorites; using SuperAbp.Exam.Mistakes; using SuperAbp.Exam.TrainingManagement; @@ -9,6 +10,10 @@ public class ExamApplicationAutoMapper : Profile { public ExamApplicationAutoMapper() { + CreateMap() + .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); + CreateMap(); + CreateMap(); CreateMap(); diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementCategoryConsts.cs b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementCategoryConsts.cs new file mode 100644 index 00000000..a60da786 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementCategoryConsts.cs @@ -0,0 +1,8 @@ +namespace SuperAbp.Exam.Announcements; + +public class AnnouncementCategoryConsts +{ + public const string DefaultSorting = "Sort ASC, CreationTime DESC"; + public const int MaxNameLength = 50; + public const int MaxRemarkLength = 200; +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs new file mode 100644 index 00000000..44301364 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs @@ -0,0 +1,9 @@ +namespace SuperAbp.Exam.Announcements; + +public class AnnouncementConsts +{ + public const string DefaultSorting = "Sort ASC, CreationTime DESC"; + + public const int MaxTitleLength = 200; + public const int MaxContentLength = 5000; +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs new file mode 100644 index 00000000..37a4e59b --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs @@ -0,0 +1,114 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告 +/// +public class Announcement : FullAuditedAggregateRoot, IMultiTenant +{ + protected Announcement() + { } + + [SetsRequiredMembers] + public Announcement(Guid id, string title, string content, int displayOrder = 0, Guid? categoryId = null) + : base(id) + { + Title = title; + Content = content; + Sort = displayOrder; + CategoryId = categoryId; + IsPublished = false; + } + + public Guid? TenantId { get; set; } + + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 内容 + /// + public string Content { get; set; } + + /// + /// 发布时间 + /// + public DateTime? PublishTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime? ExpirationTime { get; set; } + + /// + /// 是否发布 + /// + public bool IsPublished { get; set; } + + /// + /// 显示顺序(越小越靠前) + /// + public int Sort { get; set; } + + /// + /// 分类ID + /// + public Guid? CategoryId { get; set; } + + /// + /// 公告分类 + /// + public virtual AnnouncementCategory? Category { get; set; } + + /// + /// 发布 + /// + public void Publish(DateTime publishTime) + { + if (IsPublished) + { + return; + } + + IsPublished = true; + PublishTime = publishTime; + } + + /// + /// 下架 + /// + public void Unpublish() + { + IsPublished = false; + PublishTime = null; + } + + /// + /// 检查是否在有效期内 + /// + public bool IsEffective(DateTime now) + { + if (!IsPublished || !PublishTime.HasValue) + { + return false; + } + + if (ExpirationTime.HasValue && now > ExpirationTime.Value) + { + return false; + } + + if (PublishTime.Value > now) + { + return false; + } + + return true; + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementCategory.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementCategory.cs new file mode 100644 index 00000000..e3a875aa --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementCategory.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Volo.Abp.AuditLogging; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告分类 +/// +public class AnnouncementCategory : FullAuditedAggregateRoot, IMultiTenant +{ + protected AnnouncementCategory() + { + } + + [SetsRequiredMembers] + public AnnouncementCategory(Guid id, string name, int sort = 0, string? remark = null) + : base(id) + { + Name = name; + Sort = sort; + Remark = remark; + Announcements = new List(); + } + + public Guid? TenantId { get; set; } + + /// + /// 分类名称 + /// + public string Name { get; set; } + + /// + /// 显示顺序(越小越靠前) + /// + public int Sort { get; set; } + + /// + /// 备注 + /// + public string? Remark { get; set; } + + /// + /// 公告列表 + /// + public virtual ICollection Announcements { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementCategoryRepository.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementCategoryRepository.cs new file mode 100644 index 00000000..ccbb12a5 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementCategoryRepository.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace SuperAbp.Exam.Announcements; + +public interface IAnnouncementCategoryRepository : IRepository +{ +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementRepository.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementRepository.cs new file mode 100644 index 00000000..56129ea4 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/IAnnouncementRepository.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace SuperAbp.Exam.Announcements; + +public interface IAnnouncementRepository : IRepository +{ + /// + /// 获取有效的公告列表(Include 分类) + /// + Task> GetEffectiveListAsync(DateTime now, CancellationToken cancellationToken = default); + + /// + /// 获取分类下的有效公告列表 + /// + Task> GetEffectiveListByCategoryIdAsync(Guid categoryId, DateTime now, CancellationToken cancellationToken = default); + + /// + /// 数量 + /// + Task GetCountAsync( + string? title = null, + Guid? categoryId = null, + bool? isPublished = null, + CancellationToken cancellationToken = default); + + /// + /// 列表 + /// + Task> GetListAsync( + string? sorting = null, + int skipCount = 0, + int maxResultCount = int.MaxValue, + string? title = null, + Guid? categoryId = null, + bool? isPublished = null, + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementCategoryRepository.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementCategoryRepository.cs new file mode 100644 index 00000000..5b8c39d0 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementCategoryRepository.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using SuperAbp.Exam.Announcements; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace SuperAbp.Exam.EntityFrameworkCore.Announcements; + +public class AnnouncementCategoryRepository : EfCoreRepository, IAnnouncementCategoryRepository +{ + public AnnouncementCategoryRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs new file mode 100644 index 00000000..b9fbe00a --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs @@ -0,0 +1,81 @@ +using Microsoft.EntityFrameworkCore; +using SuperAbp.Exam.Announcements; +using SuperAbp.Exam.QuestionManagement.Questions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace SuperAbp.Exam.EntityFrameworkCore.Announcements; + +public class AnnouncementRepository : EfCoreRepository, IAnnouncementRepository +{ + public AnnouncementRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public virtual async Task> GetEffectiveListAsync(DateTime now, CancellationToken cancellationToken = default) + { + var dbSet = await GetDbSetAsync(); + + return await dbSet + .Include(x => x.Category) + .Where(x => x.IsPublished) + .Where(x => x.PublishTime.HasValue && x.PublishTime.Value <= now) + .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) + .OrderBy(x => x.Sort) + .ThenByDescending(x => x.CreationTime) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public virtual async Task> GetEffectiveListByCategoryIdAsync(Guid categoryId, DateTime now, CancellationToken cancellationToken = default) + { + var dbSet = await GetDbSetAsync(); + + return await dbSet + .Include(x => x.Category) + .Where(x => x.CategoryId == categoryId) + .Where(x => x.IsPublished) + .Where(x => x.PublishTime.HasValue && x.PublishTime.Value <= now) + .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) + .OrderBy(x => x.Sort) + .ThenByDescending(x => x.CreationTime) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public virtual async Task GetCountAsync( + string? title = null, + Guid? categoryId = null, + bool? isPublished = null, + CancellationToken cancellationToken = default) + { + return await (await GetQueryableAsync()) + .WhereIf(!title.IsNullOrWhiteSpace(), x => x.Title.Contains(title)) + .WhereIf(categoryId.HasValue, x => x.CategoryId == categoryId.Value) + .WhereIf(isPublished.HasValue, x => x.IsPublished == isPublished.Value) + .CountAsync(cancellationToken); + } + + public virtual async Task> GetListAsync( + string? sorting = null, + int skipCount = 0, + int maxResultCount = int.MaxValue, + string? title = null, + Guid? categoryId = null, + bool? isPublished = null, + CancellationToken cancellationToken = default) + { + return await (await GetQueryableAsync()) + .Include(x => x.Category) + .WhereIf(!title.IsNullOrWhiteSpace(), x => x.Title.Contains(title)) + .WhereIf(categoryId.HasValue, x => x.CategoryId == categoryId.Value) + .WhereIf(isPublished.HasValue, x => x.IsPublished == isPublished.Value) + .OrderBy(sorting.IsNullOrWhiteSpace() ? AnnouncementConsts.DefaultSorting : sorting) + .PageBy(skipCount, maxResultCount) + .ToListAsync(cancellationToken); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamDbContext.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamDbContext.cs index e373b625..b5e300ac 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamDbContext.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamDbContext.cs @@ -27,6 +27,7 @@ using SuperAbp.Exam.QuestionManagement.QuestionBanks; using SuperAbp.Exam.KnowledgePoints; using SuperAbp.Exam.QuestionManagement.QuestionKnowledgePoints; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.PaperManagement.PaperSections; using SuperAbp.Exam.QuestionManagement.Questions.QuestionOptions; @@ -98,6 +99,8 @@ public class ExamDbContext : public DbSet Favorites { get; set; } public DbSet Mistakes { get; set; } + public DbSet Announcements { get; set; } + public DbSet AnnouncementCategories { get; set; } public ExamDbContext(DbContextOptions options) : base(options) @@ -279,6 +282,28 @@ protected override void OnModelCreating(ModelBuilder builder) b.ToTable(ExamConsts.DbTablePrefix + "Mistakes", ExamConsts.DbSchema); b.ConfigureByConvention(); }); + + builder.Entity(b => + { + b.ToTable(ExamConsts.DbTablePrefix + "Announcements", ExamConsts.DbSchema); + b.ConfigureByConvention(); + b.ConfigureFullAudited(); + + b.Property(p => p.Title).IsRequired().HasMaxLength(AnnouncementConsts.MaxTitleLength); + b.Property(p => p.Content).IsRequired().HasMaxLength(AnnouncementConsts.MaxContentLength); + b.Property(p => p.Sort).HasDefaultValue(0); + }); + + builder.Entity(b => + { + b.ToTable(ExamConsts.DbTablePrefix + "AnnouncementCategories", ExamConsts.DbSchema); + b.ConfigureByConvention(); + b.ConfigureFullAudited(); + + b.Property(p => p.Name).IsRequired().HasMaxLength(AnnouncementCategoryConsts.MaxNameLength); + b.Property(p => p.Remark).HasMaxLength(AnnouncementCategoryConsts.MaxRemarkLength); + b.Property(p => p.Sort).HasDefaultValue(0); + }); } protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamEntityFrameworkCoreModule.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamEntityFrameworkCoreModule.cs index c9de4c89..50022942 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamEntityFrameworkCoreModule.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/ExamEntityFrameworkCoreModule.cs @@ -1,5 +1,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.ExamManagement.UserExams; using SuperAbp.Exam.PaperManagement.Papers; using SuperAbp.Exam.QuestionManagement.Questions; @@ -56,19 +57,23 @@ public override void ConfigureServices(ServiceConfigurationContext context) }); Configure(options => { - options.Entity(questionOption => + options.Entity(option => { - questionOption.DefaultWithDetailsFunc = query => query + option.DefaultWithDetailsFunc = query => query .Include(o => o.PaperSections).ThenInclude(s => s.PaperQuestions) .Include(o => o.PaperSections).ThenInclude(s => s.PaperQuestionRules); }); - options.Entity(questionOption => + options.Entity(option => { - questionOption.DefaultWithDetailsFunc = query => query.Include(o => o.Options); + option.DefaultWithDetailsFunc = query => query.Include(o => o.Options); }); - options.Entity(questionOption => + options.Entity(option => { - questionOption.DefaultWithDetailsFunc = query => query.Include(o => o.Sections).ThenInclude(o => o.Questions).ThenInclude(q => q.QuestionReviews); + option.DefaultWithDetailsFunc = query => query.Include(o => o.Sections).ThenInclude(o => o.Questions).ThenInclude(q => q.QuestionReviews); + }); + options.Entity(option => + { + option.DefaultWithDetailsFunc = query => query.Include(o => o.Category); }); }); } diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/IExamDbContext.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/IExamDbContext.cs index ee68973c..0e2000c4 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/IExamDbContext.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/IExamDbContext.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.ExamManagement.Exams; using SuperAbp.Exam.ExamManagement.UserExamQuestionReviews; using SuperAbp.Exam.ExamManagement.UserExamQuestions; @@ -74,4 +75,6 @@ public interface IExamDbContext : IEfCoreDbContext public DbSet Favorites { get; set; } public DbSet Mistakes { get; set; } + public DbSet Announcements { get; set; } + public DbSet AnnouncementCategories { get; set; } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/QuestionManagement/Questions/QuestionRepository.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/QuestionManagement/Questions/QuestionRepository.cs index a6a809f1..93a6163c 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/QuestionManagement/Questions/QuestionRepository.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/QuestionManagement/Questions/QuestionRepository.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using System.Linq; +using System.Linq.Dynamic.Core; using Microsoft.EntityFrameworkCore; using System.Threading; using SuperAbp.Exam.KnowledgePoints; @@ -116,6 +117,7 @@ join kp in pointQueryable on q.Id equals kp.QuestionId into kpGroup KnowledgePoints = s.kpGroup.Select(k => k.Name).ToList(), Options = s.q.Options }) + .OrderBy(sorting.IsNullOrWhiteSpace() ? QuestionConsts.DefaultSorting : sorting) .PageBy(skipCount, maxResultCount); return await result.ToListAsync(cancellationToken); diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.Designer.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.Designer.cs new file mode 100644 index 00000000..33304ed6 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.Designer.cs @@ -0,0 +1,3348 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using SuperAbp.Exam.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace SuperAbp.Exam.Migrations +{ + [DbContext(typeof(ExamDbContext))] + [Migration("20260205030312_AddAnnouncement")] + partial class AddAnnouncement + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(5000) + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("AppAnnouncements", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppAnnouncementCategories", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.Exams.Examination", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerMode") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManualReview") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("MaxNumberOfTimes") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PaperId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassingScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RandomOrderOfOption") + .HasColumnType("bit"); + + b.Property("ReviewMode") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalTime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("PaperId"); + + b.ToTable("AppExaminations", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestionReviews.UserExamQuestionReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserExamQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamQuestionId"); + + b.ToTable("AppUserExamQuestionReviews", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Reason") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserExamSectionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamSectionId"); + + b.ToTable("AppUserExamQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExam", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExamId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FinishedTime") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPassed") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppUserExams", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ScoreEach") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalCount") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UserExamId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamId"); + + b.ToTable("AppUserExamSections", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Favorites.Favorite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppFavorites", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.KnowledgePoints.KnowledgePoint", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppKnowledgePoints", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Mistakes.Mistake", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppMistakes", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestionRules.PaperQuestionRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KnowledgePointId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaperSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PaperSectionId"); + + b.ToTable("AppPaperQuestionRules", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManualReview") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PaperType") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalQuestionCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AppPapers", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PaperSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PaperSectionId"); + + b.ToTable("AppPaperQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PaperId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ScoreEach") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalCount") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("PaperId"); + + b.ToTable("AppPaperSections", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.QuestionBanks.QuestionBank", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppQuestionBanks", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.QuestionKnowledgePoints.QuestionKnowledgePoint", b => + { + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("KnowledgePointId") + .HasColumnType("uniqueidentifier"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("QuestionId", "KnowledgePointId"); + + b.HasIndex("QuestionId", "KnowledgePointId"); + + b.ToTable("AppQuestionKnowledgePoints", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.Question", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Analysis") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixedOrder") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RequiredAnswerCount") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.QuestionOptions.QuestionOption", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Analysis") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.ToTable("AppQuestionOptions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.TrainingManagement.Training", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TrainingSource") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppTrainings", (string)null); + }); + + modelBuilder.Entity("SuperAbp.MenuManagement.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Group") + .HasColumnType("bit"); + + b.Property("HideInBreadcrumb") + .HasColumnType("bit"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Key") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Permission") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Route") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("SuperAbpMenu", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientUri") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(max)"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("bit"); + + b.Property("IsInherited") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.HasOne("SuperAbp.Exam.Announcements.AnnouncementCategory", "Category") + .WithMany("Announcements") + .HasForeignKey("CategoryId"); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestionReviews.UserExamQuestionReview", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", "Question") + .WithMany("QuestionReviews") + .HasForeignKey("UserExamQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", null) + .WithMany("Questions") + .HasForeignKey("UserExamSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExams.UserExam", null) + .WithMany("Sections") + .HasForeignKey("UserExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestionRules.PaperQuestionRule", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") + .WithMany("PaperQuestionRules") + .HasForeignKey("PaperSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaperSection"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") + .WithMany("PaperQuestions") + .HasForeignKey("PaperSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaperSection"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.Paper", null) + .WithMany("PaperSections") + .HasForeignKey("PaperId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.QuestionOptions.QuestionOption", b => + { + b.HasOne("SuperAbp.Exam.QuestionManagement.Questions.Question", "Question") + .WithMany("Options") + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("SuperAbp.MenuManagement.Menus.Menu", b => + { + b.HasOne("SuperAbp.MenuManagement.Menus.Menu", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Navigation("Announcements"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.Navigation("QuestionReviews"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExam", b => + { + b.Navigation("Sections"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.Navigation("Questions"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + { + b.Navigation("PaperSections"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.Navigation("PaperQuestionRules"); + + b.Navigation("PaperQuestions"); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.Question", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.cs new file mode 100644 index 00000000..68331713 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260205030312_AddAnnouncement.cs @@ -0,0 +1,87 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SuperAbp.Exam.Migrations +{ + /// + public partial class AddAnnouncement : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AppAnnouncementCategories", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Sort = table.Column(type: "int", nullable: false, defaultValue: 0), + Remark = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppAnnouncementCategories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AppAnnouncements", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Content = table.Column(type: "nvarchar(max)", maxLength: 5000, nullable: false), + PublishTime = table.Column(type: "datetime2", nullable: true), + ExpirationTime = table.Column(type: "datetime2", nullable: true), + IsPublished = table.Column(type: "bit", nullable: false), + Sort = table.Column(type: "int", nullable: false, defaultValue: 0), + CategoryId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppAnnouncements", x => x.Id); + table.ForeignKey( + name: "FK_AppAnnouncements_AppAnnouncementCategories_CategoryId", + column: x => x.CategoryId, + principalTable: "AppAnnouncementCategories", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_AppAnnouncements_CategoryId", + table: "AppAnnouncements", + column: "CategoryId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppAnnouncements"); + + migrationBuilder.DropTable( + name: "AppAnnouncementCategories"); + } + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs index 6cfe35d5..c92484dc 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs @@ -24,6 +24,161 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(5000) + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PublishTime") + .HasColumnType("datetime2"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("AppAnnouncements", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppAnnouncementCategories", (string)null); + }); + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.Exams.Examination", b => { b.Property("Id") @@ -571,29 +726,69 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AppPaperQuestionRules", (string)null); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestions.PaperQuestion", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("Order") - .HasColumnType("int"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("PaperSectionId") - .HasColumnType("uniqueidentifier"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("QuestionId") - .HasColumnType("uniqueidentifier"); + b.Property("ManualReview") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PaperType") + .HasColumnType("int"); b.Property("Score") .HasPrecision(18, 2) @@ -603,14 +798,15 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.HasKey("Id"); + b.Property("TotalQuestionCount") + .HasColumnType("int"); - b.HasIndex("PaperSectionId"); + b.HasKey("Id"); - b.ToTable("AppPaperQuestions", (string)null); + b.ToTable("AppPapers", (string)null); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperSections.PaperSection", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -628,13 +824,13 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Order") .HasColumnType("int"); - b.Property("PaperId") + b.Property("PaperSectionId") .HasColumnType("uniqueidentifier"); - b.Property("Remark") - .HasColumnType("nvarchar(max)"); + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); - b.Property("ScoreEach") + b.Property("Score") .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); @@ -642,90 +838,38 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("TotalCount") - .HasColumnType("int"); - - b.Property("TotalScore") - .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); - b.HasKey("Id"); - b.HasIndex("PaperId"); + b.HasIndex("PaperSectionId"); - b.ToTable("AppPaperSections", (string)null); + b.ToTable("AppPaperQuestions", (string)null); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("ManualReview") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); + b.Property("Order") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + b.Property("PaperId") + .HasColumnType("uniqueidentifier"); - b.Property("PaperType") - .HasColumnType("int"); + b.Property("Remark") + .HasColumnType("nvarchar(max)"); - b.Property("Score") + b.Property("ScoreEach") .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); @@ -733,12 +877,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalQuestionCount") + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalCount") .HasColumnType("int"); + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + b.HasKey("Id"); - b.ToTable("AppPapers", (string)null); + b.HasIndex("PaperId"); + + b.ToTable("AppPaperSections", (string)null); }); modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.QuestionBanks.QuestionBank", b => @@ -2877,6 +3032,15 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AbpTenantConnectionStrings", (string)null); }); + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.HasOne("SuperAbp.Exam.Announcements.AnnouncementCategory", "Category") + .WithMany("Announcements") + .HasForeignKey("CategoryId"); + + b.Navigation("Category"); + }); + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestionReviews.UserExamQuestionReview", b => { b.HasOne("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", "Question") @@ -2908,7 +3072,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestionRules.PaperQuestionRule", b => { - b.HasOne("SuperAbp.Exam.PaperManagement.PaperSections.PaperSection", "PaperSection") + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") .WithMany("PaperQuestionRules") .HasForeignKey("PaperSectionId") .OnDelete(DeleteBehavior.Cascade) @@ -2917,9 +3081,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("PaperSection"); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestions.PaperQuestion", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => { - b.HasOne("SuperAbp.Exam.PaperManagement.PaperSections.PaperSection", "PaperSection") + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") .WithMany("PaperQuestions") .HasForeignKey("PaperSectionId") .OnDelete(DeleteBehavior.Cascade) @@ -2928,7 +3092,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("PaperSection"); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperSections.PaperSection", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => { b.HasOne("SuperAbp.Exam.PaperManagement.Papers.Paper", null) .WithMany("PaperSections") @@ -3099,6 +3263,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired(); }); + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Navigation("Announcements"); + }); + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => { b.Navigation("QuestionReviews"); @@ -3114,16 +3283,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Questions"); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperSections.PaperSection", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => { - b.Navigation("PaperQuestionRules"); - - b.Navigation("PaperQuestions"); + b.Navigation("PaperSections"); }); - modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => { - b.Navigation("PaperSections"); + b.Navigation("PaperQuestionRules"); + + b.Navigation("PaperQuestions"); }); modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.Question", b => diff --git a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs new file mode 100644 index 00000000..24462411 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace SuperAbp.Exam.Announcements; + +[RemoteService(Name = "Exam")] +[Area("Exam")] +[Route("api/exam/announcement-categories")] +public class AnnouncementCategoryController : AbpController, IAnnouncementCategoryAppService +{ + private readonly IAnnouncementCategoryAppService _categoryAppService; + + public AnnouncementCategoryController(IAnnouncementCategoryAppService categoryAppService) + { + _categoryAppService = categoryAppService; + } + + [HttpGet("{id}")] + public Task GetAsync(Guid id) + { + return _categoryAppService.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync() + { + return _categoryAppService.GetListAsync(); + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs new file mode 100644 index 00000000..5b53454a --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace SuperAbp.Exam.Announcements; + +[RemoteService(Name = "Exam")] +[Area("Exam")] +[Route("api/exam/announcements")] +public class AnnouncementController : AbpController, IAnnouncementAppService +{ + private readonly IAnnouncementAppService _announcementAppService; + + public AnnouncementController(IAnnouncementAppService announcementAppService) + { + _announcementAppService = announcementAppService; + } + + [HttpGet("{id}")] + public Task GetAsync(Guid id) + { + return _announcementAppService.GetAsync(id); + } + + [HttpGet("effective")] + public Task> GetEffectiveListAsync([FromQuery] Guid? categoryId = null) + { + return _announcementAppService.GetEffectiveListAsync(categoryId); + } +} diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs new file mode 100644 index 00000000..28037b77 --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs @@ -0,0 +1,105 @@ +using Shouldly; +using System; +using System.Threading.Tasks; +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Announcements; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; + +namespace SuperAbp.Exam.Admin.Announcements; + +public abstract class AnnouncementAdminAppServiceTests : ExamApplicationTestBase + where TStartupModule : IAbpModule +{ + private readonly IAnnouncementRepository _repository; + private readonly IAnnouncementAdminAppService _adminAppService; + private readonly ExamTestData _testData; + + protected AnnouncementAdminAppServiceTests() + { + _repository = GetRequiredService(); + _adminAppService = GetRequiredService(); + _testData = GetRequiredService(); + } + + [Fact] + public async Task Should_Get_List() + { + var result = await _adminAppService.GetListAsync(new GetAnnouncementsInput { MaxResultCount = 10 }); + result.TotalCount.ShouldBeGreaterThan(0); + } + + [Fact] + public async Task Should_Get() + { + var result = await _adminAppService.GetAsync(_testData.Announcement1Id); + result.ShouldNotBeNull(); + result.Title.ShouldBe(_testData.Announcement1Title); + } + + [Fact] + public async Task Should_Create() + { + var input = new AnnouncementCreateDto + { + Title = "New Announcement", + Content = "New Content", + Sort = 1, + CategoryId = _testData.AnnouncementCategory1Id + }; + + var result = await _adminAppService.CreateAsync(input); + result.ShouldNotBeNull(); + result.Title.ShouldBe(input.Title); + result.Content.ShouldBe(input.Content); + result.IsPublished.ShouldBeFalse(); + } + + [Fact] + public async Task Should_Update() + { + var input = new AnnouncementUpdateDto + { + Title = "Updated Announcement", + Content = "Updated Content", + Sort = 10, + CategoryId = _testData.AnnouncementCategory1Id + }; + + var result = await _adminAppService.UpdateAsync(_testData.Announcement1Id, input); + result.ShouldNotBeNull(); + result.Title.ShouldBe(input.Title); + result.Content.ShouldBe(input.Content); + result.Sort.ShouldBe(input.Sort); + } + + [Fact] + public async Task Should_Publish() + { + await _adminAppService.PublishAsync(_testData.Announcement4Id); + + var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement4Id); + updatedAnnouncement.IsPublished.ShouldBeTrue(); + updatedAnnouncement.PublishTime.ShouldNotBeNull(); + } + + [Fact] + public async Task Should_Unpublish() + { + await _adminAppService.UnpublishAsync(_testData.Announcement1Id); + + var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement1Id); + updatedAnnouncement.IsPublished.ShouldBeFalse(); + updatedAnnouncement.PublishTime.ShouldBeNull(); + } + + [Fact] + public async Task Should_Delete() + { + await _adminAppService.DeleteAsync(_testData.Announcement1Id); + + await Should.ThrowAsync(async () => await _repository.GetAsync(_testData.Announcement1Id)); + } +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs new file mode 100644 index 00000000..343f11e6 --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs @@ -0,0 +1,46 @@ +using Shouldly; +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; +using SuperAbp.Exam.Announcements; + +namespace SuperAbp.Exam.Announcements; + +public abstract class AnnouncementAppServiceTests : ExamApplicationTestBase + where TStartupModule : IAbpModule +{ + private readonly IAnnouncementAppService _appService; + private readonly ExamTestData _testData; + + protected AnnouncementAppServiceTests() + { + _appService = GetRequiredService(); + _testData = GetRequiredService(); + } + + [Fact] + public async Task Should_Get_Effective_List() + { + var result = await _appService.GetEffectiveListAsync(_testData.AnnouncementCategory1Id); + result.Items.ShouldNotBeNull(); + result.Items.Count.ShouldBeGreaterThan(0); + } + + [Fact] + public async Task Should_Get() + { + var result = await _appService.GetAsync(_testData.Announcement1Id); + result.ShouldNotBeNull(); + result.Title.ShouldBe(_testData.Announcement1Title); + result.CategoryName.ShouldBe(_testData.AnnouncementCategory1Name); + } + + [Fact] + public async Task Should_Throw_When_Get_Not_Effective_Announcement() + { + await Should.ThrowAsync(async () => await _appService.GetAsync(_testData.Announcement4Id)); + } +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAdminAppServiceTests.cs new file mode 100644 index 00000000..b86e17c6 --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAdminAppServiceTests.cs @@ -0,0 +1,80 @@ +using Shouldly; +using System; +using System.Threading.Tasks; +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Announcements; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; + +namespace SuperAbp.Exam.Admin.Announcements; + +public abstract class AnnouncementCategoryAdminAppServiceTests : ExamApplicationTestBase + where TStartupModule : IAbpModule +{ + private readonly IAnnouncementCategoryAdminAppService _adminAppService; + private readonly ExamTestData _testData; + + protected AnnouncementCategoryAdminAppServiceTests() + { + _adminAppService = GetRequiredService(); + _testData = GetRequiredService(); + } + + [Fact] + public async Task Should_Get_List() + { + var result = await _adminAppService.GetListAsync(); + result.Items.Count.ShouldBeGreaterThanOrEqualTo(2); + } + + [Fact] + public async Task Should_Get() + { + var result = await _adminAppService.GetAsync(_testData.AnnouncementCategory1Id); + result.ShouldNotBeNull(); + result.Name.ShouldBe(_testData.AnnouncementCategory1Name); + } + + [Fact] + public async Task Should_Create() + { + var input = new AnnouncementCategoryCreateDto + { + Name = "New Category", + Sort = 1, + Remark = "Test Remark" + }; + + var result = await _adminAppService.CreateAsync(input); + result.ShouldNotBeNull(); + result.Name.ShouldBe(input.Name); + result.Sort.ShouldBe(input.Sort); + result.Remark.ShouldBe(input.Remark); + } + + [Fact] + public async Task Should_Update() + { + var input = new AnnouncementCategoryUpdateDto + { + Name = "Updated Category", + Sort = 10, + Remark = "Updated Remark" + }; + + var result = await _adminAppService.UpdateAsync(_testData.AnnouncementCategory1Id, input); + result.ShouldNotBeNull(); + result.Name.ShouldBe(input.Name); + result.Sort.ShouldBe(input.Sort); + result.Remark.ShouldBe(input.Remark); + } + + [Fact] + public async Task Should_Delete() + { + await _adminAppService.DeleteAsync(_testData.AnnouncementCategory1Id); + + await Should.ThrowAsync(async () => await _adminAppService.GetAsync(_testData.AnnouncementCategory1Id)); + } +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAppServiceTests.cs new file mode 100644 index 00000000..953c98cc --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementCategoryAppServiceTests.cs @@ -0,0 +1,35 @@ +using Shouldly; +using System; +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace SuperAbp.Exam.Announcements; + +public abstract class AnnouncementCategoryAppServiceTests : ExamApplicationTestBase + where TStartupModule : IAbpModule +{ + private readonly IAnnouncementCategoryAppService _appService; + private readonly ExamTestData _testData; + + protected AnnouncementCategoryAppServiceTests() + { + _appService = GetRequiredService(); + _testData = GetRequiredService(); + } + + [Fact] + public async Task Should_Get_List() + { + var result = await _appService.GetListAsync(); + result.Items.Count.ShouldBeGreaterThan(0); + } + + [Fact] + public async Task Should_Get() + { + var result = await _appService.GetAsync(_testData.AnnouncementCategory1Id); + result.ShouldNotBeNull(); + result.Name.ShouldBe(_testData.AnnouncementCategory1Name); + } +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementAdminAppServiceTests.cs new file mode 100644 index 00000000..b6747c14 --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementAdminAppServiceTests.cs @@ -0,0 +1,10 @@ +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Exams; +using Xunit; + +namespace SuperAbp.Exam.EntityFrameworkCore.Applications; + +[Collection(ExamTestConsts.CollectionDefinitionName)] +public class EfCoreAnnouncementAdminAppServiceTests : AnnouncementAdminAppServiceTests +{ +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementCategoryAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementCategoryAdminAppServiceTests.cs new file mode 100644 index 00000000..f2810e1a --- /dev/null +++ b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreAnnouncementCategoryAdminAppServiceTests.cs @@ -0,0 +1,10 @@ +using SuperAbp.Exam.Admin.Announcements; +using SuperAbp.Exam.Exams; +using Xunit; + +namespace SuperAbp.Exam.EntityFrameworkCore.Applications; + +[Collection(ExamTestConsts.CollectionDefinitionName)] +public class EfCoreAnnouncementCategoryAdminAppServiceTests : AnnouncementCategoryAdminAppServiceTests +{ +} \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/ExamDbContextInUnitTest.cs b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/ExamDbContextInUnitTest.cs index d428688d..19aed4d1 100644 --- a/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/ExamDbContextInUnitTest.cs +++ b/aspnet-core/test/SuperAbp.Exam.EntityFrameworkCore.Tests/EntityFrameworkCore/ExamDbContextInUnitTest.cs @@ -1,5 +1,6 @@ using Microsoft.EntityFrameworkCore; using SmartEnum.EFCore; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.ExamManagement.Exams; using SuperAbp.Exam.ExamManagement.UserExamQuestionReviews; using SuperAbp.Exam.ExamManagement.UserExamQuestions; @@ -62,6 +63,8 @@ public class ExamDbContextInUnitTest : AbpDbContext, IE public DbSet Trains { get; set; } public DbSet Favorites { get; set; } public DbSet Mistakes { get; set; } + public DbSet Announcements { get; set; } + public DbSet AnnouncementCategories { get; set; } public ExamDbContextInUnitTest(DbContextOptions options) : base(options) { @@ -212,11 +215,34 @@ protected override void OnModelCreating(ModelBuilder builder) b.ToTable(ExamConsts.DbTablePrefix + "Favorites", ExamConsts.DbSchema); b.ConfigureByConvention(); }); + builder.Entity(b => { b.ToTable(ExamConsts.DbTablePrefix + "MistakesReviews", ExamConsts.DbSchema); b.ConfigureByConvention(); }); + + builder.Entity(b => + { + b.ToTable(ExamConsts.DbTablePrefix + "Announcements", ExamConsts.DbSchema); + b.ConfigureByConvention(); + b.ConfigureFullAudited(); + + b.Property(p => p.Title).IsRequired().HasMaxLength(AnnouncementConsts.MaxTitleLength); + b.Property(p => p.Content).IsRequired().HasMaxLength(AnnouncementConsts.MaxContentLength); + b.Property(p => p.Sort).HasDefaultValue(0); + }); + + builder.Entity(b => + { + b.ToTable(ExamConsts.DbTablePrefix + "AnnouncementCategories", ExamConsts.DbSchema); + b.ConfigureByConvention(); + b.ConfigureFullAudited(); + + b.Property(p => p.Name).IsRequired().HasMaxLength(AnnouncementCategoryConsts.MaxNameLength); + b.Property(p => p.Remark).HasMaxLength(AnnouncementCategoryConsts.MaxRemarkLength); + b.Property(p => p.Sort).HasDefaultValue(0); + }); } protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) diff --git a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestData.cs b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestData.cs index e3802203..a716d3ba 100644 --- a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestData.cs +++ b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestData.cs @@ -139,4 +139,24 @@ public class ExamTestData : ISingletonDependency public Guid Training1Id = Guid.NewGuid(); public Guid Training2Id = Guid.NewGuid(); + + // Announcement Categories + public Guid AnnouncementCategory1Id = Guid.NewGuid(); + public string AnnouncementCategory1Name = "系统公告"; + public Guid AnnouncementCategory2Id = Guid.NewGuid(); + public string AnnouncementCategory2Name = "活动通知"; + + // Announcements + public Guid Announcement1Id = Guid.NewGuid(); + public string Announcement1Title = "系统维护通知"; + public string Announcement1Content = "系统将于今晚进行维护升级。"; + public Guid Announcement2Id = Guid.NewGuid(); + public string Announcement2Title = "新功能上线"; + public string Announcement2Content = "新增了在线考试功能。"; + public Guid Announcement3Id = Guid.NewGuid(); + public string Announcement3Title = "停机公告"; + public string Announcement3Content = "服务器即将停机。"; + public Guid Announcement4Id = Guid.NewGuid(); + public string Announcement4Title = "未发布公告"; + public string Announcement4Content = "这是一条未发布的公告。"; } \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs index 92e9196e..ca359d8a 100644 --- a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs +++ b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using SuperAbp.Exam.Announcements; using SuperAbp.Exam.ExamManagement.Exams; using SuperAbp.Exam.KnowledgePoints; using SuperAbp.Exam.PaperManagement.Papers; @@ -19,6 +20,8 @@ public class ExamTestDataSeedContributor(ICurrentTenant currentTenant, IExamRepository examRepository, IPaperRepository paperRepository, ITrainingRepository trainingRepository, + IAnnouncementRepository announcementRepository, + IAnnouncementCategoryRepository announcementCategoryRepository, ExamTestData testData) : IDataSeedContributor, ITransientDependency { public async Task SeedAsync(DataSeedContext context) @@ -38,6 +41,10 @@ public async Task SeedAsync(DataSeedContext context) await CreateTrainingAsync(); await CreateKnowledgePointAsync(); + + await CreateAnnouncementCategoryAsync(); + + await CreateAnnouncementAsync(); } } @@ -147,4 +154,52 @@ await questionBankRepository.InsertManyAsync([ new QuestionBank(testData.QuestionBank1Id, testData.QuestionBank1Title), new QuestionBank(testData.QuestionBank2Id, testData.QuestionBank2Title)]); } + + private async Task CreateAnnouncementCategoryAsync() + { + await announcementCategoryRepository.InsertManyAsync([ + new AnnouncementCategory(testData.AnnouncementCategory1Id, testData.AnnouncementCategory1Name, 1, "系统相关公告"), + new AnnouncementCategory(testData.AnnouncementCategory2Id, testData.AnnouncementCategory2Name, 2, "活动相关通知") + ]); + } + + private async Task CreateAnnouncementAsync() + { + var announcement1 = new Announcement( + testData.Announcement1Id, + testData.Announcement1Title, + testData.Announcement1Content, + 1, + testData.AnnouncementCategory1Id + ); + announcement1.Publish(DateTime.Now.AddDays(-1)); + + var announcement2 = new Announcement( + testData.Announcement2Id, + testData.Announcement2Title, + testData.Announcement2Content, + 2, + testData.AnnouncementCategory2Id + ); + announcement2.Publish(DateTime.Now); + + var announcement3 = new Announcement( + testData.Announcement3Id, + testData.Announcement3Title, + testData.Announcement3Content, + 3, + testData.AnnouncementCategory1Id + ); + announcement3.Publish(DateTime.Now.AddHours(-2)); + + var announcement4 = new Announcement( + testData.Announcement4Id, + testData.Announcement4Title, + testData.Announcement4Content, + 4, + testData.AnnouncementCategory2Id + ); + + await announcementRepository.InsertManyAsync([announcement1, announcement2, announcement3, announcement4]); + } } \ No newline at end of file From 920a130b1c3d697a20e992c67feffe9e0f192e83 Mon Sep 17 00:00:00 2001 From: snow Date: Fri, 6 Feb 2026 13:26:46 +0800 Subject: [PATCH 2/6] admin ui --- .github/copilot-instructions.md | 6 + .../app/proxy/admin/announcements/index.ts | 1 + .../app/proxy/admin/announcements/models.ts | 68 + .../announcement-category.service.ts | 54 + .../admin/controllers/announcement.service.ts | 71 + .../src/app/proxy/admin/controllers/index.ts | 2 + .../admin/exam-management/exams/models.ts | 2 +- angular-admin/src/app/proxy/admin/index.ts | 3 +- .../src/app/proxy/generate-proxy.json | 8144 ++++++++++------- .../announcement-category.component.html | 13 + .../announcement-category.component.ts | 130 + .../edit/edit.component.html | 55 + .../edit/edit.component.ts | 119 + .../announcement/announcement.component.html | 13 + .../announcement/announcement.component.ts | 195 + .../sys/announcement/edit/edit.component.html | 90 + .../sys/announcement/edit/edit.component.ts | 194 + angular-admin/src/app/routes/sys/routes.ts | 18 + .../AnnouncementCategoryListDto.cs | 2 +- .../Announcements/AnnouncementCreateDto.cs | 2 + .../AnnouncementCreateDtoValidator.cs | 5 +- ...ouncementCreateOrUpdateDtoBaseValidator.cs | 18 +- .../Announcements/AnnouncementListDto.cs | 2 +- .../AnnouncementUpdateDtoValidator.cs | 5 +- .../AnnouncementAdminAppService.cs | 24 +- .../ExamApplicationAdminAutoMapperProfile.cs | 3 +- .../AnnouncementAdminController.cs | 62 - ...r.cs => AnnouncementCategoryController.cs} | 3 +- .../Controllers/AnnouncementController.cs | 57 + .../ExamPermissionDefinitionProvider.cs | 16 +- .../Announcements/AnnouncementCategoryDto.cs | 4 +- .../AnnouncementAutoPublishWorker.cs | 134 + .../ExamBackgroundServicesModule.cs | 2 + .../ExamDomainErrorCodes.cs | 7 +- .../Localization/Exam/en.json | 27 +- .../Localization/Exam/zh-Hans.json | 27 +- .../Announcements/Announcement.cs | 18 +- .../AnnouncementAlreadyPublishedException.cs | 11 + .../AnnouncementAdminAppServiceTests.cs | 4 +- .../ExamTestDataBuilder.cs | 9 +- 40 files changed, 6148 insertions(+), 3472 deletions(-) create mode 100644 angular-admin/src/app/proxy/admin/announcements/index.ts create mode 100644 angular-admin/src/app/proxy/admin/announcements/models.ts create mode 100644 angular-admin/src/app/proxy/admin/controllers/announcement-category.service.ts create mode 100644 angular-admin/src/app/proxy/admin/controllers/announcement.service.ts create mode 100644 angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.html create mode 100644 angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.ts create mode 100644 angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.html create mode 100644 angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.ts create mode 100644 angular-admin/src/app/routes/sys/announcement/announcement.component.html create mode 100644 angular-admin/src/app/routes/sys/announcement/announcement.component.ts create mode 100644 angular-admin/src/app/routes/sys/announcement/edit/edit.component.html create mode 100644 angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts delete mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs rename aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/{AnnouncementCategoryAdminController.cs => AnnouncementCategoryController.cs} (87%) create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementController.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementAlreadyPublishedException.cs diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f3fabf40..5259e6da 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,11 @@ # AI Copilot Instructions for SuperAbp Exam Project +## External Documentation References + +@https://ng.ant.design/llms.txt + +**NG-ZORRO (Ant Design for Angular)** - The admin frontend uses NG-ALAIN which is built on top of NG-ZORRO. The LLMs.txt file above contains structured documentation for all NG-ZORRO components, APIs, and usage patterns. + ## Project Architecture This is an **online exam management system** built with **ABP Framework** and **.NET**, featuring: diff --git a/angular-admin/src/app/proxy/admin/announcements/index.ts b/angular-admin/src/app/proxy/admin/announcements/index.ts new file mode 100644 index 00000000..e9644dae --- /dev/null +++ b/angular-admin/src/app/proxy/admin/announcements/index.ts @@ -0,0 +1 @@ +export * from './models'; diff --git a/angular-admin/src/app/proxy/admin/announcements/models.ts b/angular-admin/src/app/proxy/admin/announcements/models.ts new file mode 100644 index 00000000..dd2bcddb --- /dev/null +++ b/angular-admin/src/app/proxy/admin/announcements/models.ts @@ -0,0 +1,68 @@ +import type { FullAuditedEntityDto, PagedAndSortedResultRequestDto } from '@abp/ng.core'; + +export interface AnnouncementCategoryCreateDto extends AnnouncementCategoryCreateOrUpdateDtoBase { +} + +export interface AnnouncementCategoryCreateOrUpdateDtoBase { + name?: string; + sort: number; + remark?: string; +} + +export interface AnnouncementCategoryDetailDto extends FullAuditedEntityDto { + name?: string; + sort: number; + remark?: string; +} + +export interface AnnouncementCategoryListDto extends FullAuditedEntityDto { + name?: string; + sort: number; + remark?: string; +} + +export interface AnnouncementCategoryUpdateDto extends AnnouncementCategoryCreateOrUpdateDtoBase { +} + +export interface AnnouncementCreateDto extends AnnouncementCreateOrUpdateDtoBase { +} + +export interface AnnouncementCreateOrUpdateDtoBase { + title?: string; + content?: string; + publishTime?: string; + expirationTime?: string; + sort: number; + categoryId?: string; +} + +export interface AnnouncementDetailDto extends FullAuditedEntityDto { + title?: string; + content?: string; + publishTime?: string; + expirationTime?: string; + isPublished: boolean; + sort: number; + categoryId?: string; + categoryName?: string; +} + +export interface AnnouncementListDto extends FullAuditedEntityDto { + title?: string; + content?: string; + publishTime?: string; + expirationTime?: string; + isPublished: boolean; + sort: number; + categoryId?: string; + categoryName?: string; +} + +export interface AnnouncementUpdateDto extends AnnouncementCreateOrUpdateDtoBase { +} + +export interface GetAnnouncementsInput extends PagedAndSortedResultRequestDto { + title?: string; + categoryId?: string; + isPublished?: boolean; +} diff --git a/angular-admin/src/app/proxy/admin/controllers/announcement-category.service.ts b/angular-admin/src/app/proxy/admin/controllers/announcement-category.service.ts new file mode 100644 index 00000000..f2a1fbee --- /dev/null +++ b/angular-admin/src/app/proxy/admin/controllers/announcement-category.service.ts @@ -0,0 +1,54 @@ +import { RestService, Rest } from '@abp/ng.core'; +import type { ListResultDto } from '@abp/ng.core'; +import { Injectable, inject } from '@angular/core'; +import type { AnnouncementCategoryCreateDto, AnnouncementCategoryDetailDto, AnnouncementCategoryListDto, AnnouncementCategoryUpdateDto } from '../announcements/models'; + +@Injectable({ + providedIn: 'root', +}) +export class AnnouncementCategoryService { + private restService = inject(RestService); + apiName = 'Default'; + + + create = (input: AnnouncementCategoryCreateDto, config?: Partial) => + this.restService.request({ + method: 'POST', + url: '/api/announcement-categories', + body: input, + }, + { apiName: this.apiName,...config }); + + + delete = (id: string, config?: Partial) => + this.restService.request({ + method: 'DELETE', + url: `/api/announcement-categories/${id}`, + }, + { apiName: this.apiName,...config }); + + + get = (id: string, config?: Partial) => + this.restService.request({ + method: 'GET', + url: `/api/announcement-categories/${id}`, + }, + { apiName: this.apiName,...config }); + + + getList = (config?: Partial) => + this.restService.request>({ + method: 'GET', + url: '/api/announcement-categories', + }, + { apiName: this.apiName,...config }); + + + update = (id: string, input: AnnouncementCategoryUpdateDto, config?: Partial) => + this.restService.request({ + method: 'PUT', + url: `/api/announcement-categories/${id}`, + body: input, + }, + { apiName: this.apiName,...config }); +} \ No newline at end of file diff --git a/angular-admin/src/app/proxy/admin/controllers/announcement.service.ts b/angular-admin/src/app/proxy/admin/controllers/announcement.service.ts new file mode 100644 index 00000000..3b76df32 --- /dev/null +++ b/angular-admin/src/app/proxy/admin/controllers/announcement.service.ts @@ -0,0 +1,71 @@ +import { RestService, Rest } from '@abp/ng.core'; +import type { PagedResultDto } from '@abp/ng.core'; +import { Injectable, inject } from '@angular/core'; +import type { AnnouncementCreateDto, AnnouncementDetailDto, AnnouncementListDto, AnnouncementUpdateDto, GetAnnouncementsInput } from '../announcements/models'; + +@Injectable({ + providedIn: 'root', +}) +export class AnnouncementService { + private restService = inject(RestService); + apiName = 'Default'; + + + create = (input: AnnouncementCreateDto, config?: Partial) => + this.restService.request({ + method: 'POST', + url: '/api/announcements', + body: input, + }, + { apiName: this.apiName,...config }); + + + delete = (id: string, config?: Partial) => + this.restService.request({ + method: 'DELETE', + url: `/api/announcements/${id}`, + }, + { apiName: this.apiName,...config }); + + + get = (id: string, config?: Partial) => + this.restService.request({ + method: 'GET', + url: `/api/announcements/${id}`, + }, + { apiName: this.apiName,...config }); + + + getList = (input: GetAnnouncementsInput, config?: Partial) => + this.restService.request>({ + method: 'GET', + url: '/api/announcements', + params: { title: input.title, categoryId: input.categoryId, isPublished: input.isPublished, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName,...config }); + + + publish = (id: string, config?: Partial) => + this.restService.request({ + method: 'PATCH', + url: `/api/announcements/${id}/publish`, + }, + { apiName: this.apiName,...config }); + + + unpublish = (id: string, config?: Partial) => + this.restService.request({ + method: 'PATCH', + url: `/api/announcements/${id}/unpublish`, + }, + { apiName: this.apiName,...config }); + + + update = (id: string, input: AnnouncementUpdateDto, config?: Partial) => + this.restService.request({ + method: 'PUT', + url: `/api/announcements/${id}`, + body: input, + }, + { apiName: this.apiName,...config }); +} \ No newline at end of file diff --git a/angular-admin/src/app/proxy/admin/controllers/index.ts b/angular-admin/src/app/proxy/admin/controllers/index.ts index 848c6306..1872fd87 100644 --- a/angular-admin/src/app/proxy/admin/controllers/index.ts +++ b/angular-admin/src/app/proxy/admin/controllers/index.ts @@ -1,3 +1,5 @@ +export * from './announcement-category.service'; +export * from './announcement.service'; export * from './app.service'; export * from './examination.service'; export * from './knowledge-point.service'; diff --git a/angular-admin/src/app/proxy/admin/exam-management/exams/models.ts b/angular-admin/src/app/proxy/admin/exam-management/exams/models.ts index a0a91cc7..ffab1d1e 100644 --- a/angular-admin/src/app/proxy/admin/exam-management/exams/models.ts +++ b/angular-admin/src/app/proxy/admin/exam-management/exams/models.ts @@ -56,7 +56,7 @@ export interface ExamUserExamDto { } export interface GetExamForEditorOutput extends ExamCreateOrUpdateDtoBase { - status?: number; + status: number; } export interface GetExamsInput extends PagedAndSortedResultRequestDto { diff --git a/angular-admin/src/app/proxy/admin/index.ts b/angular-admin/src/app/proxy/admin/index.ts index 87ec24b0..e3aa1d99 100644 --- a/angular-admin/src/app/proxy/admin/index.ts +++ b/angular-admin/src/app/proxy/admin/index.ts @@ -1,6 +1,7 @@ +import * as Announcements from './announcements'; import * as Controllers from './controllers'; import * as ExamManagement from './exam-management'; import * as KnowledgePoints from './knowledge-points'; import * as PaperManagement from './paper-management'; import * as QuestionManagement from './question-management'; -export { Controllers, ExamManagement, KnowledgePoints, PaperManagement, QuestionManagement }; +export { Announcements, Controllers, ExamManagement, KnowledgePoints, PaperManagement, QuestionManagement }; diff --git a/angular-admin/src/app/proxy/generate-proxy.json b/angular-admin/src/app/proxy/generate-proxy.json index ded3a153..58c18343 100644 --- a/angular-admin/src/app/proxy/generate-proxy.json +++ b/angular-admin/src/app/proxy/generate-proxy.json @@ -774,43 +774,17 @@ "rootPath": "app", "remoteServiceName": "Default", "controllers": { - "SuperAbp.Exam.Admin.Controllers.AppController": { - "controllerName": "App", - "controllerGroupName": null, - "isRemoteService": false, - "isIntegrationService": false, - "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.AppController", - "interfaces": [], - "actions": { - "GetDataAsync": { - "uniqueName": "GetDataAsync", - "name": "GetDataAsync", - "httpMethod": "GET", - "url": "api/app/data", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Microsoft.AspNetCore.Mvc.IActionResult", - "typeSimple": "Microsoft.AspNetCore.Mvc.IActionResult" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.Controllers.AppController" - } - } - }, - "SuperAbp.Exam.Admin.Controllers.ExaminationController": { - "controllerName": "Examination", - "controllerGroupName": "Examination", + "SuperAbp.Exam.Admin.Controllers.AnnouncementCategoryController": { + "controllerName": "AnnouncementCategory", + "controllerGroupName": "AnnouncementCategory", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.ExaminationController", + "type": "SuperAbp.Exam.Admin.Controllers.AnnouncementCategoryController", "interfaces": [ { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService", - "name": "IExaminationAdminAppService", + "type": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService", + "name": "IAnnouncementCategoryAdminAppService", "methods": [ { "name": "GetAsync", @@ -825,59 +799,16 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" } }, { "name": "GetListAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - { - "name": "GetExamUserExamsAsync", - "parametersOnMethod": [ - { - "name": "examId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - { - "name": "GetEditorAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], + "parametersOnMethod": [], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { @@ -885,16 +816,16 @@ "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" } }, { @@ -910,101 +841,16 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" - } - }, - { - "name": "CancelAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "TerminateAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "CompleteAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "PublishAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "InvalidateAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" } }, { @@ -1032,7 +878,7 @@ "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/exam/{id}", + "url": "api/announcement-categories/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1059,24 +905,39 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService" }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", + "GetListAsync": { + "uniqueName": "GetListAsync", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/exam", + "url": "api/announcement-categories", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/announcement-categories", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", "isOptional": false, "defaultValue": null } @@ -1084,81 +945,90 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Name", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/announcement-categories/{id}", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "input", - "name": "Status", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "defaultValue": null }, { - "nameOnMethod": "input", - "name": "Sorting", + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" }, { "nameOnMethod": "input", - "name": "SkipCount", + "name": "input", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService" }, - "GetExamUserExamsAsyncByExamId": { - "uniqueName": "GetExamUserExamsAsyncByExamId", - "name": "GetExamUserExamsAsync", - "httpMethod": "GET", - "url": "api/exam/{examId}/user-exams", + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/announcement-categories/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "examId", + "name": "id", "typeAsString": "System.Guid, System.Private.CoreLib", "type": "System.Guid", "typeSimple": "string", @@ -1168,8 +1038,8 @@ ], "parameters": [ { - "nameOnMethod": "examId", - "name": "examId", + "nameOnMethod": "id", + "name": "id", "jsonName": null, "type": "System.Guid", "typeSimple": "string", @@ -1181,17 +1051,162 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "System.Void", + "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" - }, - "GetEditorAsyncById": { - "uniqueName": "GetEditorAsyncById", - "name": "GetEditorAsync", + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementCategoryAdminAppService" + } + } + }, + "SuperAbp.Exam.Admin.Controllers.AnnouncementController": { + "controllerName": "Announcement", + "controllerGroupName": "Announcement", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Admin.Controllers.AnnouncementController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService", + "name": "IAnnouncementAdminAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" + } + }, + { + "name": "GetListAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" + } + }, + { + "name": "PublishAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "UnpublishAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/exam/{id}/editor", + "url": "api/announcements/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1218,24 +1233,24 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/exam", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/announcements", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput", "isOptional": false, "defaultValue": null } @@ -1243,123 +1258,126 @@ "parameters": [ { "nameOnMethod": "input", - "name": "input", + "name": "Title", "jsonName": null, - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/exam/{id}", - "supportedVersions": [], - "parametersOnMethod": [ + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "CategoryId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, - "defaultValue": null + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "nameOnMethod": "input", + "name": "IsPublished", + "jsonName": null, + "type": "System.Boolean?", + "typeSimple": "boolean?", "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "Sorting", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { "nameOnMethod": "input", - "name": "input", + "name": "SkipCount", "jsonName": null, - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, - "CancelAsyncById": { - "uniqueName": "CancelAsyncById", - "name": "CancelAsync", - "httpMethod": "PATCH", - "url": "api/exam/{id}/cancel", + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/announcements", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, - "PublishAsyncById": { - "uniqueName": "PublishAsyncById", - "name": "PublishAsync", - "httpMethod": "PATCH", - "url": "api/exam/{id}/publish", + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/announcements/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1369,6 +1387,14 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null + }, + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", + "isOptional": false, + "defaultValue": null } ], "parameters": [ @@ -1383,57 +1409,32 @@ "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" - }, - "TerminateAsyncById": { - "uniqueName": "TerminateAsyncById", - "name": "TerminateAsync", - "httpMethod": "PATCH", - "url": "api/exam/{id}/terminate", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + }, { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, - "CompleteAsyncById": { - "uniqueName": "CompleteAsyncById", - "name": "CompleteAsync", + "PublishAsyncById": { + "uniqueName": "PublishAsyncById", + "name": "PublishAsync", "httpMethod": "PATCH", - "url": "api/exam/{id}/complete", + "url": "api/announcements/{id}/publish", "supportedVersions": [], "parametersOnMethod": [ { @@ -1464,13 +1465,13 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, - "InvalidateAsyncById": { - "uniqueName": "InvalidateAsyncById", - "name": "InvalidateAsync", + "UnpublishAsyncById": { + "uniqueName": "UnpublishAsyncById", + "name": "UnpublishAsync", "httpMethod": "PATCH", - "url": "api/exam/{id}/invalidate", + "url": "api/announcements/{id}/unpublish", "supportedVersions": [], "parametersOnMethod": [ { @@ -1501,13 +1502,13 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/exam/{id}", + "url": "api/announcements/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1538,37 +1539,97 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.Announcements.IAnnouncementAdminAppService" } } }, - "SuperAbp.Exam.Admin.Controllers.KnowledgePointController": { - "controllerName": "KnowledgePoint", - "controllerGroupName": "KnowledgePoint", + "SuperAbp.Exam.Admin.Controllers.AppController": { + "controllerName": "App", + "controllerGroupName": null, + "isRemoteService": false, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Admin.Controllers.AppController", + "interfaces": [], + "actions": { + "GetDataAsync": { + "uniqueName": "GetDataAsync", + "name": "GetDataAsync", + "httpMethod": "GET", + "url": "api/app/data", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Microsoft.AspNetCore.Mvc.IActionResult", + "typeSimple": "Microsoft.AspNetCore.Mvc.IActionResult" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.Controllers.AppController" + } + } + }, + "SuperAbp.Exam.Admin.Controllers.ExaminationController": { + "controllerName": "Examination", + "controllerGroupName": "Examination", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.KnowledgePointController", + "type": "SuperAbp.Exam.Admin.Controllers.ExaminationController", "interfaces": [ { - "type": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService", - "name": "IKnowledgePointAdminAppService", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService", + "name": "IExaminationAdminAppService", "methods": [ { - "name": "GetAllAsync", + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto" + } + }, + { + "name": "GetListAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "GetExamUserExamsAsync", + "parametersOnMethod": [ + { + "name": "examId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { @@ -1584,8 +1645,8 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput" + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput" } }, { @@ -1593,16 +1654,16 @@ "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "System.Guid", - "typeSimple": "string" + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" } }, { @@ -1618,9 +1679,26 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" + } + }, + { + "name": "CancelAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -1631,7 +1709,7 @@ } }, { - "name": "DeleteAsync", + "name": "TerminateAsync", "parametersOnMethod": [ { "name": "id", @@ -1646,24 +1724,129 @@ "type": "System.Void", "typeSimple": "System.Void" } - } - ] - } - ], - "actions": { - "GetAllAsyncByInput": { - "uniqueName": "GetAllAsyncByInput", - "name": "GetAllAsync", - "httpMethod": "GET", - "url": "knowledge-point", - "supportedVersions": [], - "parametersOnMethod": [ + }, { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", - "isOptional": false, + "name": "CompleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "PublishAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "InvalidateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/exam/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamDetailDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/exam", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput", + "isOptional": false, "defaultValue": null } ], @@ -1679,20 +1862,105 @@ "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Status", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "GetExamUserExamsAsyncByExamId": { + "uniqueName": "GetExamUserExamsAsyncByExamId", + "name": "GetExamUserExamsAsync", + "httpMethod": "GET", + "url": "api/exam/{examId}/user-exams", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "examId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "examId", + "name": "examId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" }, "GetEditorAsyncById": { "uniqueName": "GetEditorAsyncById", "name": "GetEditorAsync", "httpMethod": "GET", - "url": "knowledge-point/{id}/editor", + "url": "api/exam/{id}/editor", "supportedVersions": [], "parametersOnMethod": [ { @@ -1719,24 +1987,24 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput" + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamForEditorOutput" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "knowledge-point", + "url": "api/exam", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", "isOptional": false, "defaultValue": null } @@ -1746,8 +2014,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1756,17 +2024,17 @@ } ], "returnValue": { - "type": "System.Guid", - "typeSimple": "string" + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "knowledge-point/{id}", + "url": "api/exam/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1779,9 +2047,9 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", "isOptional": false, "defaultValue": null } @@ -1803,8 +2071,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1813,17 +2081,202 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.Exams.ExamListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "CancelAsyncById": { + "uniqueName": "CancelAsyncById", + "name": "CancelAsync", + "httpMethod": "PATCH", + "url": "api/exam/{id}/cancel", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "PublishAsyncById": { + "uniqueName": "PublishAsyncById", + "name": "PublishAsync", + "httpMethod": "PATCH", + "url": "api/exam/{id}/publish", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "TerminateAsyncById": { + "uniqueName": "TerminateAsyncById", + "name": "TerminateAsync", + "httpMethod": "PATCH", + "url": "api/exam/{id}/terminate", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "CompleteAsyncById": { + "uniqueName": "CompleteAsyncById", + "name": "CompleteAsync", + "httpMethod": "PATCH", + "url": "api/exam/{id}/complete", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" + }, + "InvalidateAsyncById": { + "uniqueName": "InvalidateAsyncById", + "name": "InvalidateAsync", + "httpMethod": "PATCH", + "url": "api/exam/{id}/invalidate", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "knowledge-point/{id}", + "url": "api/exam/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1854,204 +2307,71 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.Exams.IExaminationAdminAppService" } } }, - "SuperAbp.Exam.Admin.Controllers.OptionController": { - "controllerName": "Option", - "controllerGroupName": "Option", + "SuperAbp.Exam.Admin.Controllers.KnowledgePointController": { + "controllerName": "KnowledgePoint", + "controllerGroupName": "KnowledgePoint", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.OptionController", + "type": "SuperAbp.Exam.Admin.Controllers.KnowledgePointController", "interfaces": [ { - "type": "SuperAbp.Exam.Options.IOptionAppService", - "name": "IOptionAppService", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService", + "name": "IKnowledgePointAdminAppService", "methods": [ { - "name": "GetExaminationStatus", - "parametersOnMethod": [], + "name": "GetAllAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", + "isOptional": false, + "defaultValue": null + } + ], "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { - "name": "GetQuestionTypes", - "parametersOnMethod": [], + "name": "GetEditorAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" + "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput" } }, { - "name": "GetAnswerModes", - "parametersOnMethod": [], + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "isOptional": false, + "defaultValue": null + } + ], "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - } - }, - { - "name": "GetReviewModes", - "parametersOnMethod": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - } - }, - { - "name": "GetUserExamStatus", - "parametersOnMethod": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - } - } - ] - } - ], - "actions": { - "GetQuestionTypes": { - "uniqueName": "GetQuestionTypes", - "name": "GetQuestionTypes", - "httpMethod": "GET", - "url": "api/options/question-types", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" - }, - "GetAnswerModes": { - "uniqueName": "GetAnswerModes", - "name": "GetAnswerModes", - "httpMethod": "GET", - "url": "api/options/answer-modes", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" - }, - "GetReviewModes": { - "uniqueName": "GetReviewModes", - "name": "GetReviewModes", - "httpMethod": "GET", - "url": "api/options/review-modes", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" - }, - "GetExaminationStatus": { - "uniqueName": "GetExaminationStatus", - "name": "GetExaminationStatus", - "httpMethod": "GET", - "url": "api/options/examination-status", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" - }, - "GetUserExamStatus": { - "uniqueName": "GetUserExamStatus", - "name": "GetUserExamStatus", - "httpMethod": "GET", - "url": "api/options/user-exam-status", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.Dictionary", - "typeSimple": "{number:string}" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" - } - } - }, - "SuperAbp.Exam.Admin.Controllers.PaperController": { - "controllerName": "Paper", - "controllerGroupName": "Paper", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.PaperController", - "interfaces": [ - { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService", - "name": "IPaperAdminAppService", - "methods": [ - { - "name": "GetListAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - { - "name": "GetEditorAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput" - } - }, - { - "name": "CreateAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" + "type": "System.Guid", + "typeSimple": "string" } }, { @@ -2067,16 +2387,16 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" + "type": "System.Void", + "typeSimple": "System.Void" } }, { @@ -2100,18 +2420,18 @@ } ], "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetAllAsyncByInput": { + "uniqueName": "GetAllAsyncByInput", + "name": "GetAllAsync", "httpMethod": "GET", - "url": "api/paper", + "url": "knowledge-point", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointsInput", "isOptional": false, "defaultValue": null } @@ -2128,56 +2448,20 @@ "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" }, "GetEditorAsyncById": { "uniqueName": "GetEditorAsyncById", "name": "GetEditorAsync", "httpMethod": "GET", - "url": "api/paper/{id}/editor", + "url": "knowledge-point/{id}/editor", "supportedVersions": [], "parametersOnMethod": [ { @@ -2204,24 +2488,24 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput" + "type": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.GetKnowledgePointForEditorOutput" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/paper", + "url": "knowledge-point", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", "isOptional": false, "defaultValue": null } @@ -2231,8 +2515,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2241,17 +2525,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" + "type": "System.Guid", + "typeSimple": "string" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/paper/{id}", + "url": "knowledge-point/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -2264,9 +2548,9 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", "isOptional": false, "defaultValue": null } @@ -2288,8 +2572,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "type": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.KnowledgePoints.KnowledgePointUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2298,17 +2582,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", - "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" + "type": "System.Void", + "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/paper/{id}", + "url": "knowledge-point/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -2339,54 +2623,170 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.KnowledgePoints.IKnowledgePointAdminAppService" } } }, - "SuperAbp.Exam.Admin.Controllers.QuestionBankController": { - "controllerName": "QuestionBank", - "controllerGroupName": "QuestionBank", + "SuperAbp.Exam.Admin.Controllers.OptionController": { + "controllerName": "Option", + "controllerGroupName": "Option", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.QuestionBankController", + "type": "SuperAbp.Exam.Admin.Controllers.OptionController", "interfaces": [ { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService", - "name": "IQuestionBankAdminAppService", + "type": "SuperAbp.Exam.Options.IOptionAppService", + "name": "IOptionAppService", "methods": [ { - "name": "GetAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], + "name": "GetExaminationStatus", + "parametersOnMethod": [], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto" + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + } + }, + { + "name": "GetQuestionTypes", + "parametersOnMethod": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + } + }, + { + "name": "GetAnswerModes", + "parametersOnMethod": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + } + }, + { + "name": "GetReviewModes", + "parametersOnMethod": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" } }, + { + "name": "GetUserExamStatus", + "parametersOnMethod": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + } + } + ] + } + ], + "actions": { + "GetQuestionTypes": { + "uniqueName": "GetQuestionTypes", + "name": "GetQuestionTypes", + "httpMethod": "GET", + "url": "api/options/question-types", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" + }, + "GetAnswerModes": { + "uniqueName": "GetAnswerModes", + "name": "GetAnswerModes", + "httpMethod": "GET", + "url": "api/options/answer-modes", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" + }, + "GetReviewModes": { + "uniqueName": "GetReviewModes", + "name": "GetReviewModes", + "httpMethod": "GET", + "url": "api/options/review-modes", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" + }, + "GetExaminationStatus": { + "uniqueName": "GetExaminationStatus", + "name": "GetExaminationStatus", + "httpMethod": "GET", + "url": "api/options/examination-status", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" + }, + "GetUserExamStatus": { + "uniqueName": "GetUserExamStatus", + "name": "GetUserExamStatus", + "httpMethod": "GET", + "url": "api/options/user-exam-status", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.Dictionary", + "typeSimple": "{number:string}" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Options.IOptionAppService" + } + } + }, + "SuperAbp.Exam.Admin.Controllers.PaperController": { + "controllerName": "Paper", + "controllerGroupName": "Paper", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Admin.Controllers.PaperController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService", + "name": "IPaperAdminAppService", + "methods": [ { "name": "GetListAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" } }, { @@ -2402,8 +2802,8 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput" } }, { @@ -2411,16 +2811,16 @@ "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" } }, { @@ -2436,16 +2836,16 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" } }, { @@ -2469,55 +2869,18 @@ } ], "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/question-management/question-bank/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" - }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/question-management/question-bank", + "url": "api/paper", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPapersInput", "isOptional": false, "defaultValue": null } @@ -2525,7 +2888,7 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Title", + "name": "Name", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -2573,17 +2936,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" }, "GetEditorAsyncById": { "uniqueName": "GetEditorAsyncById", "name": "GetEditorAsync", "httpMethod": "GET", - "url": "api/question-management/question-bank/{id}/editor", + "url": "api/paper/{id}/editor", "supportedVersions": [], "parametersOnMethod": [ { @@ -2610,24 +2973,24 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.GetPaperForEditorOutput" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/question-management/question-bank", + "url": "api/paper", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", "isOptional": false, "defaultValue": null } @@ -2637,8 +3000,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2647,17 +3010,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/question-management/question-bank/{id}", + "url": "api/paper/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -2670,9 +3033,9 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", "isOptional": false, "defaultValue": null } @@ -2694,8 +3057,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2704,17 +3067,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" + "type": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto", + "typeSimple": "SuperAbp.Exam.Admin.PaperManagement.Papers.PaperListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/question-management/question-bank/{id}", + "url": "api/paper/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -2745,37 +3108,37 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.PaperManagement.Papers.IPaperAdminAppService" } } }, - "SuperAbp.Exam.Admin.Controllers.QuestionController": { - "controllerName": "Question", - "controllerGroupName": "Question", + "SuperAbp.Exam.Admin.Controllers.QuestionBankController": { + "controllerName": "QuestionBank", + "controllerGroupName": "QuestionBank", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.QuestionController", + "type": "SuperAbp.Exam.Admin.Controllers.QuestionBankController", "interfaces": [ { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService", - "name": "IQuestionAdminAppService", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService", + "name": "IQuestionBankAdminAppService", "methods": [ { - "name": "GetCountAsync", + "name": "GetAsync", "parametersOnMethod": [ { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "System.Int32", - "typeSimple": "number" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto" } }, { @@ -2783,33 +3146,16 @@ "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - { - "name": "GetListWithDetailAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "System.Collections.Generic.IReadOnlyList", - "typeSimple": "[SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionDetailDto]" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" } }, { @@ -2825,25 +3171,8 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput" - } - }, - { - "name": "ImportAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput" } }, { @@ -2851,16 +3180,16 @@ "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" } }, { @@ -2876,16 +3205,16 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" } }, { @@ -2904,109 +3233,60 @@ "type": "System.Void", "typeSimple": "System.Void" } - }, - { - "name": "DeleteAnswerAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "answerId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } } ] } ], "actions": { - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/question-management/question/count", + "url": "api/question-management/question-bank/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "QuestionBankId", - "jsonName": null, - "type": "System.Guid?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "QuestionType", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "KnowledgePointId", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.Guid?", - "typeSimple": "string?", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" } ], "returnValue": { - "type": "System.Int32", - "typeSimple": "number" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankDetailDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/question-management/question", + "url": "api/question-management/question-bank", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBanksInput", "isOptional": false, "defaultValue": null } @@ -3014,7 +3294,7 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Content", + "name": "Title", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -3026,10 +3306,10 @@ }, { "nameOnMethod": "input", - "name": "QuestionType", + "name": "Sorting", "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3038,10 +3318,10 @@ }, { "nameOnMethod": "input", - "name": "QuestionBankIds", + "name": "SkipCount", "jsonName": null, - "type": "System.Guid[]", - "typeSimple": "[string]", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3050,143 +3330,10 @@ }, { "nameOnMethod": "input", - "name": "KnowledgePointId", + "name": "MaxResultCount", "jsonName": null, - "type": "System.Guid?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ExcludeIds", - "jsonName": null, - "type": "System.Collections.Generic.List", - "typeSimple": "[string]", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" - }, - "GetListWithDetailAsyncByInput": { - "uniqueName": "GetListWithDetailAsyncByInput", - "name": "GetListWithDetailAsync", - "httpMethod": "GET", - "url": "api/question-management/question/details", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "QuestionBankId", - "jsonName": null, - "type": "System.Guid?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "QuestionType", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "IncludeIds", - "jsonName": null, - "type": "System.Collections.Generic.List", - "typeSimple": "[string]", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ExcludeIds", - "jsonName": null, - "type": "System.Collections.Generic.List", - "typeSimple": "[string]", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Count", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3195,17 +3342,17 @@ } ], "returnValue": { - "type": "System.Collections.Generic.IReadOnlyList", - "typeSimple": "[SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionDetailDto]" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" }, "GetEditorAsyncById": { "uniqueName": "GetEditorAsyncById", "name": "GetEditorAsync", "httpMethod": "GET", - "url": "api/question-management/question/{id}/editor", + "url": "api/question-management/question-bank/{id}/editor", "supportedVersions": [], "parametersOnMethod": [ { @@ -3232,61 +3379,24 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" - }, - "ImportAsyncByInput": { - "uniqueName": "ImportAsyncByInput", - "name": "ImportAsync", - "httpMethod": "POST", - "url": "api/question-management/question/import", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionBankForEditorOutput" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/question-management/question", + "url": "api/question-management/question-bank", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", "isOptional": false, "defaultValue": null } @@ -3296,8 +3406,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3306,17 +3416,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/question-management/question/{id}", + "url": "api/question-management/question-bank/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -3329,9 +3439,9 @@ }, { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", "isOptional": false, "defaultValue": null } @@ -3353,8 +3463,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3363,17 +3473,17 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", - "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.QuestionBankListDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/question-management/question/{id}", + "url": "api/question-management/question-bank/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -3404,98 +3514,75 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" - }, - "DeleteAnswerAsyncByIdAndAnswerId": { - "uniqueName": "DeleteAnswerAsyncByIdAndAnswerId", - "name": "DeleteAnswerAsync", - "httpMethod": "DELETE", - "url": "api/question-management/question/{id}/answer/{answerId}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.IQuestionBankAdminAppService" + } + } + }, + "SuperAbp.Exam.Admin.Controllers.QuestionController": { + "controllerName": "Question", + "controllerGroupName": "Question", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Admin.Controllers.QuestionController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService", + "name": "IQuestionAdminAppService", + "methods": [ { - "name": "answerId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "name": "GetCountAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Int32", + "typeSimple": "number" + } }, - { - "nameOnMethod": "answerId", - "name": "answerId", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" - } - } - }, - "SuperAbp.Exam.Admin.Controllers.UserExamController": { - "controllerName": "UserExam", - "controllerGroupName": "UserExam", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "SuperAbp.Exam.Admin.Controllers.UserExamController", - "interfaces": [ - { - "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService", - "name": "IUserExamAdminAppService", - "methods": [ { "name": "GetListAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" } }, { - "name": "GetAsync", + "name": "GetListWithDetailAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Collections.Generic.IReadOnlyList", + "typeSimple": "[SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionDetailDto]" + } + }, + { + "name": "GetEditorAsync", "parametersOnMethod": [ { "name": "id", @@ -3507,12 +3594,46 @@ } ], "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto" + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput" } }, { - "name": "ReviewQuestionsAsync", + "name": "ImportAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + } + }, + { + "name": "UpdateAsync", "parametersOnMethod": [ { "name": "id", @@ -3524,9 +3645,51 @@ }, { "name": "input", - "typeAsString": "System.Collections.Generic.List`1[[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto, SuperAbp.Exam.Admin.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", - "type": "System.Collections.Generic.List", - "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "DeleteAnswerAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "answerId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -3540,18 +3703,18 @@ } ], "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", "httpMethod": "GET", - "url": "api/user-exam", + "url": "api/question-management/question/count", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput, SuperAbp.Exam.Admin.Application.Contracts", - "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.QuestionBanks.GetQuestionCountInput", "isOptional": false, "defaultValue": null } @@ -3559,10 +3722,10 @@ "parameters": [ { "nameOnMethod": "input", - "name": "ExamId", + "name": "QuestionBankId", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3571,10 +3734,10 @@ }, { "nameOnMethod": "input", - "name": "UserId", + "name": "QuestionType", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Int32?", + "typeSimple": "number?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3583,22 +3746,47 @@ }, { "nameOnMethod": "input", - "name": "Sorting", + "name": "KnowledgePointId", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" - }, + } + ], + "returnValue": { + "type": "System.Int32", + "typeSimple": "number" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/question-management/question", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ { "nameOnMethod": "input", - "name": "SkipCount", + "name": "Content", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3607,225 +3795,108 @@ }, { "nameOnMethod": "input", - "name": "MaxResultCount", + "name": "QuestionType", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.Int32?", + "typeSimple": "number?", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/user-exam/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + }, { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "QuestionBankIds", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Guid[]", + "typeSimple": "[string]", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto", - "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" - }, - "ReviewQuestionsAsyncByIdAndInput": { - "uniqueName": "ReviewQuestionsAsyncByIdAndInput", - "name": "ReviewQuestionsAsync", - "httpMethod": "PATCH", - "url": "api/user-exam/review", - "supportedVersions": [], - "parametersOnMethod": [ + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "KnowledgePointId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, - "defaultValue": null + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { - "name": "input", - "typeAsString": "System.Collections.Generic.List`1[[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto, SuperAbp.Exam.Admin.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", - "type": "System.Collections.Generic.List", - "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", + "nameOnMethod": "input", + "name": "ExcludeIds", + "jsonName": null, + "type": "System.Collections.Generic.List", + "typeSimple": "[string]", "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "Sorting", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" }, { "nameOnMethod": "input", - "name": "input", + "name": "SkipCount", "jsonName": null, - "type": "System.Collections.Generic.List", - "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" - } - } - } - } - }, - "auditLogging": { - "rootPath": "auditLogging", - "remoteServiceName": "AuditLogging", - "controllers": { - "SuperAbp.AuditLogging.AuditLogController": { - "controllerName": "AuditLog", - "controllerGroupName": "AuditLog", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "SuperAbp.AuditLogging.AuditLogController", - "interfaces": [ - { - "type": "SuperAbp.AuditLogging.IAuditLogAppService", - "name": "IAuditLogAppService", - "methods": [ - { - "name": "GetListAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput, SuperAbp.AuditLogging.Application.Contracts", - "type": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", - "typeSimple": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { - "name": "GetDetailAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto", - "typeSimple": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto" - } - } - ] - } - ], - "actions": { - "GetDetailAsyncById": { - "uniqueName": "GetDetailAsyncById", - "name": "GetDetailAsync", - "httpMethod": "GET", - "url": "api/audit-logging/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "MaxResultCount", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto", - "typeSimple": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.AuditLogging.IAuditLogAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetListWithDetailAsyncByInput": { + "uniqueName": "GetListWithDetailAsyncByInput", + "name": "GetListWithDetailAsync", "httpMethod": "GET", - "url": "api/audit-logging", + "url": "api/question-management/question/details", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput, SuperAbp.AuditLogging.Application.Contracts", - "type": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", - "typeSimple": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionWithDetailInput", "isOptional": false, "defaultValue": null } @@ -3833,10 +3904,10 @@ "parameters": [ { "nameOnMethod": "input", - "name": "HttpMethod", + "name": "QuestionBankId", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3845,10 +3916,10 @@ }, { "nameOnMethod": "input", - "name": "Url", + "name": "QuestionType", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Int32?", + "typeSimple": "number?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3857,10 +3928,10 @@ }, { "nameOnMethod": "input", - "name": "HttpStatusCode", + "name": "IncludeIds", "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", + "type": "System.Collections.Generic.List", + "typeSimple": "[string]", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3869,10 +3940,10 @@ }, { "nameOnMethod": "input", - "name": "StartDate", + "name": "ExcludeIds", "jsonName": null, - "type": "System.DateTime?", - "typeSimple": "string?", + "type": "System.Collections.Generic.List", + "typeSimple": "[string]", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3881,46 +3952,10 @@ }, { "nameOnMethod": "input", - "name": "EndDate", + "name": "Count", "jsonName": null, - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.Int32?", + "typeSimple": "number?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -3929,138 +3964,23 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "System.Collections.Generic.IReadOnlyList", + "typeSimple": "[SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionDetailDto]" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.AuditLogging.IAuditLogAppService" - } - } - } - } - }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", - "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "controllerGroupName": "Features", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "Volo.Abp.FeatureManagement.FeaturesController", - "interfaces": [ - { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService", - "name": "IFeatureAppService", - "methods": [ - { - "name": "GetAsync", - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" - } - }, - { - "name": "UpdateAsync", - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "DeleteAsync", - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - ] - } - ], - "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + }, + "GetEditorAsyncById": { + "uniqueName": "GetEditorAsyncById", + "name": "GetEditorAsync", "httpMethod": "GET", - "url": "api/feature-management/features", + "url": "api/question-management/question/{id}/editor", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -4068,100 +3988,142 @@ ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.GetQuestionForEditorOutput" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + }, + "ImportAsyncByInput": { + "uniqueName": "ImportAsyncByInput", + "name": "ImportAsync", + "httpMethod": "POST", + "url": "api/question-management/question/import", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionImportDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + "type": "System.Void", + "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/feature-management/features", + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/question-management/question", "supportedVersions": [], "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, { "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/question-management/question/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null }, { - "nameOnMethod": "providerKey", - "name": "providerKey", + "name": "input", + "typeAsString": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4169,32 +4131,69 @@ "descriptorName": "" } ], + "returnValue": { + "type": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto", + "typeSimple": "SuperAbp.Exam.Admin.QuestionManagement.Questions.QuestionListDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/question-management/question/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" }, - "DeleteAsyncByProviderNameAndProviderKey": { - "uniqueName": "DeleteAsyncByProviderNameAndProviderKey", - "name": "DeleteAsync", + "DeleteAnswerAsyncByIdAndAnswerId": { + "uniqueName": "DeleteAnswerAsyncByIdAndAnswerId", + "name": "DeleteAnswerAsync", "httpMethod": "DELETE", - "url": "api/feature-management/features", + "url": "api/question-management/question/{id}/answer/{answerId}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null }, { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "answerId", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -4202,27 +4201,27 @@ ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" }, { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "answerId", + "name": "answerId", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], @@ -4231,89 +4230,58 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + "implementFrom": "SuperAbp.Exam.Admin.QuestionManagement.Questions.IQuestionAdminAppService" } } - } - } - }, - "identity": { - "rootPath": "identity", - "remoteServiceName": "AbpIdentity", - "controllers": { - "Volo.Abp.Identity.IdentityRoleController": { - "controllerName": "IdentityRole", - "controllerGroupName": "Role", + }, + "SuperAbp.Exam.Admin.Controllers.UserExamController": { + "controllerName": "UserExam", + "controllerGroupName": "UserExam", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "Volo.Abp.Identity.IdentityRoleController", + "type": "SuperAbp.Exam.Admin.Controllers.UserExamController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityRoleAppService", - "name": "IIdentityRoleAppService", + "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService", + "name": "IUserExamAdminAppService", "methods": [ - { - "name": "GetAllListAsync", - "parametersOnMethod": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - { - "name": "GetAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, { "name": "GetListAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityRolesInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { - "name": "CreateAsync", + "name": "GetAsync", "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto" } }, { - "name": "UpdateAsync", + "name": "ReviewQuestionsAsync", "parametersOnMethod": [ { "name": "id", @@ -4325,26 +4293,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - { - "name": "DeleteAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "typeAsString": "System.Collections.Generic.List`1[[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto, SuperAbp.Exam.Admin.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", + "type": "System.Collections.Generic.List", + "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", "isOptional": false, "defaultValue": null } @@ -4358,33 +4309,18 @@ } ], "actions": { - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" - }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/roles", + "url": "api/user-exam", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityRolesInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeAsString": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput, SuperAbp.Exam.Admin.Application.Contracts", + "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.GetUserExamsInput", "isOptional": false, "defaultValue": null } @@ -4392,9 +4328,9 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Filter", + "name": "ExamId", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -4404,9 +4340,9 @@ }, { "nameOnMethod": "input", - "name": "Sorting", + "name": "UserId", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -4416,10 +4352,10 @@ }, { "nameOnMethod": "input", - "name": "SkipCount", + "name": "Sorting", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4428,7 +4364,7 @@ }, { "nameOnMethod": "input", - "name": "MaxResultCount", + "name": "SkipCount", "jsonName": null, "type": "System.Int32", "typeSimple": "number", @@ -4440,10 +4376,10 @@ }, { "nameOnMethod": "input", - "name": "ExtraProperties", + "name": "MaxResultCount", "jsonName": null, - "type": "Volo.Abp.Data.ExtraPropertyDictionary", - "typeSimple": "{string:object}", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4452,17 +4388,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" }, "GetAsyncById": { "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/roles/{id}", + "url": "api/user-exam/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -4489,54 +4425,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + "type": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto", + "typeSimple": "SuperAbp.Exam.Admin.ExamManagement.UserExams.UserExamDetailDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}", + "ReviewQuestionsAsyncByIdAndInput": { + "uniqueName": "ReviewQuestionsAsyncByIdAndInput", + "name": "ReviewQuestionsAsync", + "httpMethod": "PATCH", + "url": "api/user-exam/review", "supportedVersions": [], "parametersOnMethod": [ { @@ -4549,9 +4448,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeAsString": "System.Collections.Generic.List`1[[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto, SuperAbp.Exam.Admin.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", + "type": "System.Collections.Generic.List", + "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", "isOptional": false, "defaultValue": null } @@ -4565,16 +4464,16 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "type": "System.Collections.Generic.List", + "typeSimple": "[SuperAbp.Exam.Admin.ExamManagement.UserExams.ReviewedQuestionDto]", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4582,150 +4481,52 @@ "descriptorName": "" } ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + "implementFrom": "SuperAbp.Exam.Admin.ExamManagement.UserExams.IUserExamAdminAppService" } } - }, - "Volo.Abp.Identity.IdentityUserController": { - "controllerName": "IdentityUser", - "controllerGroupName": "User", + } + } + }, + "auditLogging": { + "rootPath": "auditLogging", + "remoteServiceName": "AuditLogging", + "controllers": { + "SuperAbp.AuditLogging.AuditLogController": { + "controllerName": "AuditLog", + "controllerGroupName": "AuditLog", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "Volo.Abp.Identity.IdentityUserController", + "type": "SuperAbp.AuditLogging.AuditLogController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserAppService", - "name": "IIdentityUserAppService", + "type": "SuperAbp.AuditLogging.IAuditLogAppService", + "name": "IAuditLogAppService", "methods": [ { - "name": "GetRolesAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - { - "name": "GetAssignableRolesAsync", - "parametersOnMethod": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - { - "name": "UpdateRolesAsync", + "name": "GetListAsync", "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "FindByUsernameAsync", - "parametersOnMethod": [ - { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - { - "name": "FindByEmailAsync", - "parametersOnMethod": [ - { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "typeAsString": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput, SuperAbp.AuditLogging.Application.Contracts", + "type": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", + "typeSimple": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" } }, { - "name": "GetAsync", + "name": "GetDetailAsync", "parametersOnMethod": [ { "name": "id", @@ -4737,97 +4538,21 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto", + "typeSimple": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto" } - }, - { - "name": "GetListAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - { - "name": "CreateAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - { - "name": "UpdateAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - { - "name": "DeleteAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - ] - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ + } + ] + } + ], + "actions": { + "GetDetailAsyncById": { + "uniqueName": "GetDetailAsyncById", + "name": "GetDetailAsync", + "httpMethod": "GET", + "url": "api/audit-logging/{id}", + "supportedVersions": [], + "parametersOnMethod": [ { "name": "id", "typeAsString": "System.Guid, System.Private.CoreLib", @@ -4852,24 +4577,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto", + "typeSimple": "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + "implementFrom": "SuperAbp.AuditLogging.IAuditLogAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users", + "url": "api/audit-logging", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeAsString": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput, SuperAbp.AuditLogging.Application.Contracts", + "type": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", + "typeSimple": "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput", "isOptional": false, "defaultValue": null } @@ -4877,7 +4602,7 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Filter", + "name": "HttpMethod", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -4889,7 +4614,7 @@ }, { "nameOnMethod": "input", - "name": "Sorting", + "name": "Url", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -4901,10 +4626,10 @@ }, { "nameOnMethod": "input", - "name": "SkipCount", + "name": "HttpStatusCode", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.Int32?", + "typeSimple": "number?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4913,10 +4638,10 @@ }, { "nameOnMethod": "input", - "name": "MaxResultCount", + "name": "StartDate", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.DateTime?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -4925,166 +4650,186 @@ }, { "nameOnMethod": "input", - "name": "ExtraProperties", + "name": "EndDate", "jsonName": null, - "type": "Volo.Abp.Data.ExtraPropertyDictionary", - "typeSimple": "{string:object}", + "type": "System.DateTime?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/users", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + }, { "nameOnMethod": "input", - "name": "input", + "name": "Sorting", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "SkipCount", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { "nameOnMethod": "input", - "name": "input", + "name": "MaxResultCount", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ + "implementFrom": "SuperAbp.AuditLogging.IAuditLogAppService" + } + } + } + } + }, + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", + "controllers": { + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.FeatureManagement.FeaturesController", + "interfaces": [ + { + "type": "Volo.Abp.FeatureManagement.IFeatureAppService", + "name": "IFeatureAppService", + "methods": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + } + }, { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" - }, - "GetRolesAsyncById": { - "uniqueName": "GetRolesAsyncById", - "name": "GetRolesAsync", + ] + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}/roles", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -5092,83 +4837,100 @@ ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "providerName", + "name": "providerName", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" - }, - "GetAssignableRolesAsync": { - "uniqueName": "GetAssignableRolesAsync", - "name": "GetAssignableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/assignable-roles", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" }, - "UpdateRolesAsyncByIdAndInput": { - "uniqueName": "UpdateRolesAsyncByIdAndInput", - "name": "UpdateRolesAsync", + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/identity/users/{id}/roles", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "providerName", + "name": "providerName", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5181,17 +4943,25 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" }, - "FindByUsernameAsyncByUserName": { - "uniqueName": "FindByUsernameAsyncByUserName", - "name": "FindByUsernameAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-username/{userName}", + "DeleteAsyncByProviderNameAndProviderKey": { + "uniqueName": "DeleteAsyncByProviderNameAndProviderKey", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "userName", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", "typeAsString": "System.String, System.Private.CoreLib", "type": "System.String", "typeSimple": "string", @@ -5201,78 +4971,67 @@ ], "parameters": [ { - "nameOnMethod": "userName", - "name": "userName", + "nameOnMethod": "providerName", + "name": "providerName", "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" - }, - "FindByEmailAsyncByEmail": { - "uniqueName": "FindByEmailAsyncByEmail", - "name": "FindByEmailAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-email/{email}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + }, { - "nameOnMethod": "email", - "name": "email", + "nameOnMethod": "providerKey", + "name": "providerKey", "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "System.Void", + "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" } } - }, - "Volo.Abp.Identity.IdentityUserLookupController": { - "controllerName": "IdentityUserLookup", - "controllerGroupName": "UserLookup", + } + } + }, + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", + "controllers": { + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "Volo.Abp.Identity.IdentityUserLookupController", + "type": "Volo.Abp.Identity.IdentityRoleController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserLookupAppService", - "name": "IIdentityUserLookupAppService", + "type": "Volo.Abp.Identity.IIdentityRoleAppService", + "name": "IIdentityRoleAppService", "methods": [ { - "name": "FindByIdAsync", + "name": "GetAllListAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "GetAsync", "parametersOnMethod": [ { "name": "id", @@ -5284,151 +5043,117 @@ } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" } }, { - "name": "FindByUserNameAsync", + "name": "GetListAsync", "parametersOnMethod": [ { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" } }, { - "name": "SearchAsync", + "name": "CreateAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" } }, { - "name": "GetCountAsync", + "name": "UpdateAsync", "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "System.Int64", - "typeSimple": "number" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" } } ] } ], "actions": { - "FindByIdAsyncById": { - "uniqueName": "FindByIdAsyncById", - "name": "FindByIdAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" - }, - "FindByUserNameAsyncByUserName": { - "uniqueName": "FindByUserNameAsyncByUserName", - "name": "FindByUserNameAsync", + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/by-username/{userName}", + "url": "api/identity/roles/all", "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "userName", - "name": "userName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], + "parametersOnMethod": [], + "parameters": [], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" }, - "SearchAsyncByInput": { - "uniqueName": "SearchAsyncByInput", - "name": "SearchAsync", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/search", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", "isOptional": false, "defaultValue": null } @@ -5496,87 +5221,221 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/count", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" } ], "returnValue": { - "type": "System.Int64", - "typeSimple": "number" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" } } - } - } - }, - "menuManagement": { - "rootPath": "menuManagement", - "remoteServiceName": "MenuManagement", - "controllers": { - "SuperAbp.MenuManagement.Menus.MenuController": { - "controllerName": "Menu", - "controllerGroupName": "Menu", + }, + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "SuperAbp.MenuManagement.Menus.MenuController", + "type": "Volo.Abp.Identity.IdentityUserController", "interfaces": [ { - "type": "SuperAbp.MenuManagement.Menus.IMenuAppService", - "name": "IMenuAppService", + "type": "Volo.Abp.Identity.IIdentityUserAppService", + "name": "IIdentityUserAppService", "methods": [ { - "name": "GetAllListAsync", - "parametersOnMethod": [], + "name": "GetRolesAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { - "name": "GetRootAsync", + "name": "GetAssignableRolesAsync", "parametersOnMethod": [], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { - "name": "GetChildrenAsync", + "name": "UpdateRolesAsync", "parametersOnMethod": [ { "name": "id", @@ -5585,66 +5444,57 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - { - "name": "GetListAsync", - "parametersOnMethod": [ + }, { "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.GetMenusInput, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.GetMenusInput", - "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenusInput", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "System.Void", + "typeSimple": "System.Void" } }, { - "name": "GetEditorAsync", + "name": "FindByUsernameAsync", "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput", - "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" } }, { - "name": "CreateAsync", + "name": "FindByEmailAsync", "parametersOnMethod": [ { - "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.MenuCreateDto, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.MenuListDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" } }, { - "name": "UpdateAsync", + "name": "GetAsync", "parametersOnMethod": [ { "name": "id", @@ -5653,29 +5503,80 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null - }, - { - "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.MenuUpdateDto, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", - "isOptional": false, - "defaultValue": null } ], "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.MenuListDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" } }, { - "name": "DeleteAsync", + "name": "GetListAsync", "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -5689,78 +5590,11 @@ } ], "actions": { - "GetEditorAsyncById": { - "uniqueName": "GetEditorAsyncById", - "name": "GetEditorAsync", - "httpMethod": "GET", - "url": "api/menus/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput", - "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" - }, - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/menus/list", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" - }, - "GetRootAsync": { - "uniqueName": "GetRootAsync", - "name": "GetRootAsync", - "httpMethod": "GET", - "url": "api/menus/root", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" - }, - "GetChildrenAsyncById": { - "uniqueName": "GetChildrenAsyncById", - "name": "GetChildrenAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/menus/{id}/children", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -5787,24 +5621,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/menus", + "url": "api/identity/users", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.GetMenusInput, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.GetMenusInput", - "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenusInput", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", "isOptional": false, "defaultValue": null } @@ -5812,10 +5646,10 @@ "parameters": [ { "nameOnMethod": "input", - "name": "ParentId", + "name": "Filter", "jsonName": null, - "type": "System.Guid?", - "typeSimple": "string?", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5824,7 +5658,7 @@ }, { "nameOnMethod": "input", - "name": "Name", + "name": "Sorting", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -5836,10 +5670,10 @@ }, { "nameOnMethod": "input", - "name": "Sorting", + "name": "SkipCount", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Int32", + "typeSimple": "number", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5848,7 +5682,7 @@ }, { "nameOnMethod": "input", - "name": "SkipCount", + "name": "MaxResultCount", "jsonName": null, "type": "System.Int32", "typeSimple": "number", @@ -5860,10 +5694,10 @@ }, { "nameOnMethod": "input", - "name": "MaxResultCount", + "name": "ExtraProperties", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "Volo.Abp.Data.ExtraPropertyDictionary", + "typeSimple": "{string:object}", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5872,24 +5706,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/menus", + "url": "api/identity/users", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.MenuCreateDto, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", "isOptional": false, "defaultValue": null } @@ -5899,8 +5733,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5909,17 +5743,17 @@ } ], "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.MenuListDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/menus/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -5932,9 +5766,9 @@ }, { "name": "input", - "typeAsString": "SuperAbp.MenuManagement.Menus.MenuUpdateDto, SuperAbp.MenuManagement.Application.Contracts", - "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null } @@ -5956,8 +5790,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -5966,17 +5800,17 @@ } ], "returnValue": { - "type": "SuperAbp.MenuManagement.Menus.MenuListDto", - "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/menus/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -6007,191 +5841,15 @@ "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" - } - } - } - } - }, - "multi-tenancy": { - "rootPath": "multi-tenancy", - "remoteServiceName": "AbpTenantManagement", - "controllers": { - "Volo.Abp.TenantManagement.TenantController": { - "controllerName": "Tenant", - "controllerGroupName": "Tenant", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "Volo.Abp.TenantManagement.TenantController", - "interfaces": [ - { - "type": "Volo.Abp.TenantManagement.ITenantAppService", - "name": "ITenantAppService", - "methods": [ - { - "name": "GetDefaultConnectionStringAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.String", - "typeSimple": "string" - } - }, - { - "name": "UpdateDefaultConnectionStringAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "DeleteDefaultConnectionStringAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - { - "name": "GetAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } - }, - { - "name": "GetListAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.GetTenantsInput", - "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - { - "name": "CreateAsync", - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } - }, - { - "name": "UpdateAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } - }, - { - "name": "DeleteAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - ] - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/{id}/roles", + "supportedVersions": [], + "parametersOnMethod": [ { "name": "id", "typeAsString": "System.Guid, System.Private.CoreLib", @@ -6216,184 +5874,249 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/users/assignable-roles", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.GetTenantsInput", - "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" }, { "nameOnMethod": "input", - "name": "MaxResultCount", + "name": "input", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "System.Void", + "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/multi-tenancy/tenants", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", + "nameOnMethod": "userName", + "name": "userName", "jsonName": null, - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}", + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-email/{email}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", - "isOptional": false, - "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "email", + "name": "email", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}", + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.Identity.IdentityUserLookupController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService", + "name": "IIdentityUserLookupAppService", + "methods": [ + { + "name": "FindByIdAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + } + }, + { + "name": "FindByUserNameAsync", + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + } + }, + { + "name": "SearchAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "GetCountAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Int64", + "typeSimple": "number" + } + } + ] + } + ], + "actions": { + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -6420,23 +6143,23 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "GetDefaultConnectionStringAsyncById": { - "uniqueName": "GetDefaultConnectionStringAsyncById", - "name": "GetDefaultConnectionStringAsync", + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/lookup/by-username/{userName}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -6444,10 +6167,10 @@ ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "userName", + "name": "userName", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -6457,52 +6180,44 @@ } ], "returnValue": { - "type": "System.String", - "typeSimple": "string" + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { - "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", - "name": "UpdateDefaultConnectionStringAsync", - "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "Filter", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" }, { - "nameOnMethod": "defaultConnectionString", - "name": "defaultConnectionString", + "nameOnMethod": "input", + "name": "Sorting", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -6510,155 +6225,226 @@ "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "ExtraProperties", + "jsonName": null, + "type": "Volo.Abp.Data.ExtraPropertyDictionary", + "typeSimple": "{string:object}", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "DeleteDefaultConnectionStringAsyncById": { - "uniqueName": "DeleteDefaultConnectionStringAsyncById", - "name": "DeleteDefaultConnectionStringAsync", - "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "Filter", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "System.Int64", + "typeSimple": "number" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" } } } } }, - "permissionManagement": { - "rootPath": "permissionManagement", - "remoteServiceName": "AbpPermissionManagement", + "menuManagement": { + "rootPath": "menuManagement", + "remoteServiceName": "MenuManagement", "controllers": { - "Volo.Abp.PermissionManagement.PermissionsController": { - "controllerName": "Permissions", - "controllerGroupName": "Permissions", + "SuperAbp.MenuManagement.Menus.MenuController": { + "controllerName": "Menu", + "controllerGroupName": "Menu", "isRemoteService": true, "isIntegrationService": false, "apiVersion": null, - "type": "Volo.Abp.PermissionManagement.PermissionsController", + "type": "SuperAbp.MenuManagement.Menus.MenuController", "interfaces": [ { - "type": "Volo.Abp.PermissionManagement.IPermissionAppService", - "name": "IPermissionAppService", + "type": "SuperAbp.MenuManagement.Menus.IMenuAppService", + "name": "IMenuAppService", "methods": [ { - "name": "GetAsync", + "name": "GetAllListAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "GetRootAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "GetChildrenAsync", "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" } }, { - "name": "GetByGroupAsync", + "name": "GetListAsync", "parametersOnMethod": [ { - "name": "groupName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.MenuManagement.Menus.GetMenusInput, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.GetMenusInput", + "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenusInput", "isOptional": false, "defaultValue": null - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "GetEditorAsync", + "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, + } + ], + "returnValue": { + "type": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput", + "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.MenuManagement.Menus.MenuCreateDto, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", "isOptional": false, "defaultValue": null } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + "type": "SuperAbp.MenuManagement.Menus.MenuListDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" } }, { "name": "UpdateAsync", "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null }, { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.MenuManagement.Menus.MenuUpdateDto, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", "isOptional": false, "defaultValue": null - }, + } + ], + "returnValue": { + "type": "SuperAbp.MenuManagement.Menus.MenuListDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -6672,25 +6458,17 @@ } ], "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", + "GetEditorAsyncById": { + "uniqueName": "GetEditorAsyncById", + "name": "GetEditorAsync", "httpMethod": "GET", - "url": "api/permission-management/permissions", + "url": "api/menus/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -6698,85 +6476,124 @@ ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + "type": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput", + "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenuForEditorOutput" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" }, - "GetByGroupAsyncByGroupNameAndProviderNameAndProviderKey": { - "uniqueName": "GetByGroupAsyncByGroupNameAndProviderNameAndProviderKey", - "name": "GetByGroupAsync", + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", "httpMethod": "GET", - "url": "api/permission-management/permissions/by-group", + "url": "api/menus/list", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + }, + "GetRootAsync": { + "uniqueName": "GetRootAsync", + "name": "GetRootAsync", + "httpMethod": "GET", + "url": "api/menus/root", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + }, + "GetChildrenAsyncById": { + "uniqueName": "GetChildrenAsyncById", + "name": "GetChildrenAsync", + "httpMethod": "GET", + "url": "api/menus/{id}/children", "supportedVersions": [], "parametersOnMethod": [ { - "name": "groupName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", "typeSimple": "string", "isOptional": false, - "defaultValue": null - }, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/menus", + "supportedVersions": [], + "parametersOnMethod": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.MenuManagement.Menus.GetMenusInput, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.GetMenusInput", + "typeSimple": "SuperAbp.MenuManagement.Menus.GetMenusInput", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "groupName", - "name": "groupName", + "nameOnMethod": "input", + "name": "ParentId", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" }, { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "input", + "name": "Name", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -6784,11 +6601,11 @@ "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" }, { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "input", + "name": "Sorting", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -6796,79 +6613,120 @@ "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/permission-management/permissions", + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/menus", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "SuperAbp.MenuManagement.Menus.MenuCreateDto, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.MenuManagement.Menus.MenuListDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/menus/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null }, { "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeAsString": "SuperAbp.MenuManagement.Menus.MenuUpdateDto, SuperAbp.MenuManagement.Application.Contracts", + "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "type": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -6877,48 +6735,102 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "SuperAbp.MenuManagement.Menus.MenuListDto", + "typeSimple": "SuperAbp.MenuManagement.Menus.MenuListDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" - } - } - } - } - }, - "settingManagement": { - "rootPath": "settingManagement", - "remoteServiceName": "SettingManagement", - "controllers": { - "Volo.Abp.SettingManagement.EmailSettingsController": { - "controllerName": "EmailSettings", - "controllerGroupName": "EmailSettings", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/menus/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.MenuManagement.Menus.IMenuAppService" + } + } + } + } + }, + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", + "controllers": { + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.TenantManagement.TenantController", "interfaces": [ { - "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService", - "name": "IEmailSettingsAppService", + "type": "Volo.Abp.TenantManagement.ITenantAppService", + "name": "ITenantAppService", "methods": [ { - "name": "GetAsync", - "parametersOnMethod": [], + "name": "GetDefaultConnectionStringAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], "returnValue": { - "type": "Volo.Abp.SettingManagement.EmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + "type": "System.String", + "typeSimple": "string" } }, { - "name": "UpdateAsync", + "name": "UpdateDefaultConnectionStringAsync", "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -6929,13 +6841,106 @@ } }, { - "name": "SendTestEmailAsync", + "name": "DeleteDefaultConnectionStringAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + } + }, + { + "name": "GetListAsync", "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.SendTestEmailInput, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.SendTestEmailInput", - "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -6949,71 +6954,129 @@ } ], "actions": { - "GetAsync": { - "uniqueName": "GetAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/setting-management/emailing", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.SettingManagement.EmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "POST", - "url": "api/setting-management/emailing", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "SendTestEmailAsyncByInput": { - "uniqueName": "SendTestEmailAsyncByInput", - "name": "SendTestEmailAsync", - "httpMethod": "POST", - "url": "api/setting-management/emailing/send-test-email", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.SendTestEmailInput, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.SendTestEmailInput", - "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", - "isOptional": false, + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, "defaultValue": null } ], @@ -7022,8 +7085,65 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.SettingManagement.SendTestEmailInput", - "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -7031,146 +7151,1235 @@ "descriptorName": "" } ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" }, "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" - } - } + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + } + } + } + } + }, + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", + "controllers": { + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.PermissionManagement.PermissionsController", + "interfaces": [ + { + "type": "Volo.Abp.PermissionManagement.IPermissionAppService", + "name": "IPermissionAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + } + }, + { + "name": "GetByGroupAsync", + "parametersOnMethod": [ + { + "name": "groupName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + }, + "GetByGroupAsyncByGroupNameAndProviderNameAndProviderKey": { + "uniqueName": "GetByGroupAsyncByGroupNameAndProviderNameAndProviderKey", + "name": "GetByGroupAsync", + "httpMethod": "GET", + "url": "api/permission-management/permissions/by-group", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "groupName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "groupName", + "name": "groupName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + } + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService", + "name": "IEmailSettingsAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "SendTestEmailAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.SendTestEmailInput, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.SendTestEmailInput", + "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "SendTestEmailAsyncByInput": { + "uniqueName": "SendTestEmailAsyncByInput", + "name": "SendTestEmailAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing/send-test-email", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.SendTestEmailInput, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.SendTestEmailInput", + "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.SendTestEmailInput", + "typeSimple": "Volo.Abp.SettingManagement.SendTestEmailInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + } + }, + "Volo.Abp.SettingManagement.TimeZoneSettingsController": { + "controllerName": "TimeZoneSettings", + "controllerGroupName": "TimeZoneSettings", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Volo.Abp.SettingManagement.TimeZoneSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService", + "name": "ITimeZoneSettingsAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + } + }, + { + "name": "GetTimezonesAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.Abp.NameValue]" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "timezone", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/timezone", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" + }, + "GetTimezonesAsync": { + "uniqueName": "GetTimezonesAsync", + "name": "GetTimezonesAsync", + "httpMethod": "GET", + "url": "api/setting-management/timezone/timezones", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.Abp.NameValue]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" + }, + "UpdateAsyncByTimezone": { + "uniqueName": "UpdateAsyncByTimezone", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/timezone", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "timezone", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "timezone", + "name": "timezone", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" + } + } + } + } + } + }, + "types": { + "Microsoft.AspNetCore.Mvc.IActionResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ServiceName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "MethodName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Parameters", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionDuration", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ApplicationName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "TenantName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionDuration", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ClientIpAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ClientName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "BrowserInfo", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "HttpMethod", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Exceptions", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Comments", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "HttpStatusCode", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Actions", + "jsonName": null, + "type": "[SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto]", + "typeSimple": "[SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto]", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.AuditLogging.Dtos.AuditLogListDto": { + "baseType": "Volo.Abp.Application.Dtos.EntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ApplicationName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "TenantName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ExecutionDuration", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "ClientIpAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "HttpMethod", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "HttpStatusCode", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "HttpMethod", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "HttpStatusCode", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "StartDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null }, - "Volo.Abp.SettingManagement.TimeZoneSettingsController": { - "controllerName": "TimeZoneSettings", - "controllerGroupName": "TimeZoneSettings", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "Volo.Abp.SettingManagement.TimeZoneSettingsController", - "interfaces": [ - { - "type": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService", - "name": "ITimeZoneSettingsAppService", - "methods": [ - { - "name": "GetAsync", - "parametersOnMethod": [], - "returnValue": { - "type": "System.String", - "typeSimple": "string" - } - }, - { - "name": "GetTimezonesAsync", - "parametersOnMethod": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.NameValue]" - } - }, - { - "name": "UpdateAsync", - "parametersOnMethod": [ - { - "name": "timezone", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - ] - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/setting-management/timezone", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.String", - "typeSimple": "string" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" - }, - "GetTimezonesAsync": { - "uniqueName": "GetTimezonesAsync", - "name": "GetTimezonesAsync", - "httpMethod": "GET", - "url": "api/setting-management/timezone/timezones", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.NameValue]" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" - }, - "UpdateAsyncByTimezone": { - "uniqueName": "UpdateAsyncByTimezone", - "name": "UpdateAsync", - "httpMethod": "POST", - "url": "api/setting-management/timezone", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "timezone", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "timezone", - "name": "timezone", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.SettingManagement.ITimeZoneSettingsAppService" - } - } + { + "name": "EndDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null } - } - } - }, - "types": { - "Microsoft.AspNetCore.Mvc.IActionResult": { - "baseType": null, + ] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateDto": { + "baseType": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateOrUpdateDtoBase", "isEnum": false, "enumNames": null, "enumValues": null, "genericArguments": null, "properties": [] }, - "SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto": { + "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateOrUpdateDtoBase": { "baseType": null, "isEnum": false, "enumNames": null, @@ -7178,7 +8387,7 @@ "genericArguments": null, "properties": [ { - "name": "ServiceName", + "name": "Name", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7190,7 +8399,19 @@ "regex": null }, { - "name": "MethodName", + "name": "Sort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Remark", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7200,9 +8421,18 @@ "minimum": null, "maximum": null, "regex": null - }, + } + ] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryDetailDto": { + "baseType": "Volo.Abp.Application.Dtos.FullAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ { - "name": "Parameters", + "name": "Name", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7214,9 +8444,42 @@ "regex": null }, { - "name": "ExecutionTime", + "name": "Sort", "jsonName": null, - "type": "System.DateTime", + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Remark", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryListDto": { + "baseType": "Volo.Abp.Application.Dtos.FullAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", "typeSimple": "string", "isRequired": false, "minLength": null, @@ -7226,7 +8489,7 @@ "regex": null }, { - "name": "ExecutionDuration", + "name": "Sort", "jsonName": null, "type": "System.Int32", "typeSimple": "number", @@ -7236,10 +8499,38 @@ "minimum": null, "maximum": null, "regex": null + }, + { + "name": "Remark", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null } ] }, - "SuperAbp.AuditLogging.Dtos.AuditLogDetailDto": { + "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryUpdateDto": { + "baseType": "SuperAbp.Exam.Admin.Announcements.AnnouncementCategoryCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateDto": { + "baseType": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateOrUpdateDtoBase": { "baseType": null, "isEnum": false, "enumNames": null, @@ -7247,7 +8538,7 @@ "genericArguments": null, "properties": [ { - "name": "ApplicationName", + "name": "Title", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7259,7 +8550,7 @@ "regex": null }, { - "name": "UserName", + "name": "Content", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7271,10 +8562,10 @@ "regex": null }, { - "name": "TenantName", + "name": "PublishTime", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7283,10 +8574,10 @@ "regex": null }, { - "name": "ExecutionTime", + "name": "ExpirationTime", "jsonName": null, - "type": "System.DateTime", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7295,7 +8586,7 @@ "regex": null }, { - "name": "ExecutionDuration", + "name": "Sort", "jsonName": null, "type": "System.Int32", "typeSimple": "number", @@ -7307,19 +8598,28 @@ "regex": null }, { - "name": "ClientIpAddress", + "name": "CategoryId", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, "minimum": null, "maximum": null, "regex": null - }, + } + ] + }, + "SuperAbp.Exam.Admin.Announcements.AnnouncementDetailDto": { + "baseType": "Volo.Abp.Application.Dtos.FullAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ { - "name": "ClientName", + "name": "Title", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7331,7 +8631,7 @@ "regex": null }, { - "name": "BrowserInfo", + "name": "Content", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7343,10 +8643,10 @@ "regex": null }, { - "name": "HttpMethod", + "name": "PublishTime", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7355,10 +8655,10 @@ "regex": null }, { - "name": "Url", + "name": "ExpirationTime", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7367,10 +8667,10 @@ "regex": null }, { - "name": "Exceptions", + "name": "IsPublished", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Boolean", + "typeSimple": "boolean", "isRequired": false, "minLength": null, "maxLength": null, @@ -7379,10 +8679,10 @@ "regex": null }, { - "name": "Comments", + "name": "Sort", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Int32", + "typeSimple": "number", "isRequired": false, "minLength": null, "maxLength": null, @@ -7391,10 +8691,10 @@ "regex": null }, { - "name": "HttpStatusCode", + "name": "CategoryId", "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", + "type": "System.Guid?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7403,10 +8703,10 @@ "regex": null }, { - "name": "Actions", + "name": "CategoryName", "jsonName": null, - "type": "[SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto]", - "typeSimple": "[SuperAbp.AuditLogging.Dtos.AuditLogActionDetailDto]", + "type": "System.String", + "typeSimple": "string", "isRequired": false, "minLength": null, "maxLength": null, @@ -7416,15 +8716,15 @@ } ] }, - "SuperAbp.AuditLogging.Dtos.AuditLogListDto": { - "baseType": "Volo.Abp.Application.Dtos.EntityDto", + "SuperAbp.Exam.Admin.Announcements.AnnouncementListDto": { + "baseType": "Volo.Abp.Application.Dtos.FullAuditedEntityDto", "isEnum": false, "enumNames": null, "enumValues": null, "genericArguments": null, "properties": [ { - "name": "ApplicationName", + "name": "Title", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7436,7 +8736,7 @@ "regex": null }, { - "name": "UserName", + "name": "Content", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7448,10 +8748,10 @@ "regex": null }, { - "name": "TenantName", + "name": "PublishTime", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7460,10 +8760,10 @@ "regex": null }, { - "name": "ExecutionTime", + "name": "ExpirationTime", "jsonName": null, - "type": "System.DateTime", - "typeSimple": "string", + "type": "System.DateTime?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7472,10 +8772,10 @@ "regex": null }, { - "name": "ExecutionDuration", + "name": "IsPublished", "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", + "type": "System.Boolean", + "typeSimple": "boolean", "isRequired": false, "minLength": null, "maxLength": null, @@ -7484,10 +8784,10 @@ "regex": null }, { - "name": "ClientIpAddress", + "name": "Sort", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Int32", + "typeSimple": "number", "isRequired": false, "minLength": null, "maxLength": null, @@ -7496,10 +8796,10 @@ "regex": null }, { - "name": "HttpMethod", + "name": "CategoryId", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "System.Guid?", + "typeSimple": "string?", "isRequired": false, "minLength": null, "maxLength": null, @@ -7508,7 +8808,7 @@ "regex": null }, { - "name": "Url", + "name": "CategoryName", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7518,22 +8818,18 @@ "minimum": null, "maximum": null, "regex": null - }, - { - "name": "HttpStatusCode", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", - "isRequired": false, - "minLength": null, - "maxLength": null, - "minimum": null, - "maximum": null, - "regex": null } ] }, - "SuperAbp.AuditLogging.Dtos.GetAuditLogsInput": { + "SuperAbp.Exam.Admin.Announcements.AnnouncementUpdateDto": { + "baseType": "SuperAbp.Exam.Admin.Announcements.AnnouncementCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "SuperAbp.Exam.Admin.Announcements.GetAnnouncementsInput": { "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", "isEnum": false, "enumNames": null, @@ -7541,19 +8837,7 @@ "genericArguments": null, "properties": [ { - "name": "HttpMethod", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": false, - "minLength": null, - "maxLength": null, - "minimum": null, - "maximum": null, - "regex": null - }, - { - "name": "Url", + "name": "Title", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -7565,21 +8849,9 @@ "regex": null }, { - "name": "HttpStatusCode", - "jsonName": null, - "type": "System.Int32?", - "typeSimple": "number?", - "isRequired": false, - "minLength": null, - "maxLength": null, - "minimum": null, - "maximum": null, - "regex": null - }, - { - "name": "StartDate", + "name": "CategoryId", "jsonName": null, - "type": "System.DateTime?", + "type": "System.Guid?", "typeSimple": "string?", "isRequired": false, "minLength": null, @@ -7589,10 +8861,10 @@ "regex": null }, { - "name": "EndDate", + "name": "IsPublished", "jsonName": null, - "type": "System.DateTime?", - "typeSimple": "string?", + "type": "System.Boolean?", + "typeSimple": "boolean?", "isRequired": false, "minLength": null, "maxLength": null, @@ -8104,7 +9376,20 @@ "enumNames": null, "enumValues": null, "genericArguments": null, - "properties": [] + "properties": [ + { + "name": "Status", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] }, "SuperAbp.Exam.Admin.ExamManagement.Exams.GetExamsInput": { "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", @@ -10895,6 +12180,76 @@ } ] }, + "Volo.Abp.Application.Dtos.AuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.CreationAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "LastModificationTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "LastModifierId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "Volo.Abp.Application.Dtos.CreationAuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.EntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "CreationTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CreatorId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, "Volo.Abp.Application.Dtos.EntityDto": { "baseType": null, "isEnum": false, @@ -11137,6 +12492,53 @@ } ] }, + "Volo.Abp.Application.Dtos.FullAuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.AuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "IsDeleted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "DeleterId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "DeletionTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, "Volo.Abp.Application.Dtos.LimitedResultRequestDto": { "baseType": null, "isEnum": false, diff --git a/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.html b/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.html new file mode 100644 index 00000000..e7dcaceb --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.html @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.ts b/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.ts new file mode 100644 index 00000000..88c10cc5 --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement-category/announcement-category.component.ts @@ -0,0 +1,130 @@ +import { ConfigStateService, CoreModule, LocalizationService, PermissionService } from '@abp/ng.core'; +import { Component, inject, OnInit, ViewChild } from '@angular/core'; +import { PageHeaderModule } from '@delon/abc/page-header'; +import { STChange, STColumn, STComponent, STModule, STPage } from '@delon/abc/st'; +import { DelonFormModule, SFSchema } from '@delon/form'; +import { ModalHelper } from '@delon/theme'; +import { AnnouncementCategoryService } from '@proxy/admin/controllers'; +import { AnnouncementCategoryListDto } from '@proxy/admin/announcements/models'; +import { NzButtonModule } from 'ng-zorro-antd/button'; +import { NzCardModule } from 'ng-zorro-antd/card'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; +import { tap } from 'rxjs/operators'; +import { SysAnnouncementCategoryEditComponent } from './edit/edit.component'; + + +@Component({ + selector: 'app-sys-announcement-category', + templateUrl: './announcement-category.component.html', + imports: [ + CoreModule, + PageHeaderModule, + DelonFormModule, + STModule, + NzCardModule, + NzButtonModule, + NzPopconfirmModule + ] +}) +export class SysAnnouncementCategoryComponent implements OnInit { + private modal = inject(ModalHelper); + private localizationService = inject(LocalizationService); + private messageService = inject(NzMessageService); + private permissionService = inject(PermissionService); + private categoryService = inject(AnnouncementCategoryService); + + categories: AnnouncementCategoryListDto[]; + total: number; + loading = false; + page: STPage = { + show: false + }; + searchSchema: SFSchema = { + properties: { + name: { + type: 'string', + title: '', + ui: { + placeholder: this.localizationService.instant('Exam::Placeholder', this.localizationService.instant('Exam::Name')) + } + } + } + }; + @ViewChild('st', { static: false }) st: STComponent; + columns: STColumn[] = [ + { title: this.localizationService.instant('Exam::Name'), index: 'name' }, + { title: this.localizationService.instant('Exam::Sort'), index: 'sort' }, + { title: this.localizationService.instant('Exam::Remark'), index: 'remark' }, + { + title: this.localizationService.instant('Exam::Actions'), + buttons: [ + { + icon: 'edit', + type: 'modal', + iif: () => { + return this.permissionService.getGrantedPolicy('Exam.AnnouncementCategories.Update'); + }, + modal: { + component: SysAnnouncementCategoryEditComponent, + params: (record: any) => ({ + categoryId: record.id + }) + }, + click: 'reload' + }, + { + icon: 'delete', + type: 'del', + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'danger', + icon: 'star' + }, + iif: () => { + return this.permissionService.getGrantedPolicy('Exam.AnnouncementCategories.Delete'); + }, + click: (record: any, _modal, component) => { + this.categoryService.delete(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::DeletedSuccessfully')); + // tslint:disable-next-line: no-non-null-assertion + component!.removeRow(record); + }); + } + } + ] + } + ]; + + ngOnInit() { + this.getList(); + } + + getList() { + this.loading = true; + this.categoryService + .getList() + .pipe(tap(() => (this.loading = false))) + .subscribe(response => { + this.categories = response.items; + this.total = response.items.length; + }); + } + + reset() { + this.st.load(1); + } + + search(e) { + if (e.name) { + this.categories = this.categories.filter(c => c.name.includes(e.name)); + } else { + delete e.name; + } + this.st.load(1); + } + + add() { + this.modal.createStatic(SysAnnouncementCategoryEditComponent, { categoryId: '' }).subscribe(() => this.getList()); + } +} diff --git a/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.html b/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.html new file mode 100644 index 00000000..a5b66f4a --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.html @@ -0,0 +1,55 @@ +@if (form) { + + + +} @else { + +} \ No newline at end of file diff --git a/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.ts b/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.ts new file mode 100644 index 00000000..53c44563 --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement-category/edit/edit.component.ts @@ -0,0 +1,119 @@ +import { CoreModule, LocalizationService } from '@abp/ng.core'; +import { Component, OnInit, Input } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { AnnouncementCategoryService } from '@proxy/admin/controllers'; +import { AnnouncementCategoryDetailDto } from '@proxy/admin/announcements/models'; +import { NzButtonModule } from 'ng-zorro-antd/button'; +import { NzFormModule } from 'ng-zorro-antd/form'; +import { NzInputModule } from 'ng-zorro-antd/input'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalModule, NzModalRef } from 'ng-zorro-antd/modal'; +import { NzSpinModule } from 'ng-zorro-antd/spin'; +import { finalize, tap } from 'rxjs/operators'; +import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; + +@Component({ + selector: 'app-sys-announcement-category-edit', + templateUrl: './edit.component.html', + imports: [ + CoreModule, + NzSpinModule, + NzModalModule, + NzFormModule, + NzInputModule, + NzInputNumberModule, + NzButtonModule + ] +}) +export class SysAnnouncementCategoryEditComponent implements OnInit { + @Input() + categoryId: string; + + category: AnnouncementCategoryDetailDto; + loading = false; + isConfirmLoading = false; + + form: FormGroup = null; + + constructor( + private fb: FormBuilder, + private modal: NzModalRef, + private messageService: NzMessageService, + private localizationService: LocalizationService, + private categoryService: AnnouncementCategoryService + ) {} + + ngOnInit(): void { + this.loading = true; + + if (this.categoryId) { + this.categoryService + .get(this.categoryId) + .pipe( + tap(response => { + this.category = response; + this.buildForm(); + this.loading = false; + }) + ) + .subscribe(); + } else { + this.category = { + name: '', + sort: 0, + remark: '' + } as AnnouncementCategoryDetailDto; + this.buildForm(); + this.loading = false; + } + } + + buildForm() { + this.form = this.fb.group({ + name: [this.category?.name || '', [Validators.required]], + sort: [this.category?.sort ?? 0, [Validators.required, Validators.min(0)]], + remark: [this.category?.remark || null] + }); + } + + save() { + if (!this.form.valid || this.isConfirmLoading) { + for (const key of Object.keys(this.form.controls)) { + this.form.controls[key].markAsDirty(); + this.form.controls[key].updateValueAndValidity(); + } + return; + } + this.isConfirmLoading = true; + + const data = this.form.value; + + if (this.categoryId) { + this.categoryService + .update(this.categoryId, data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } else { + this.categoryService + .create(data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } + } + + close() { + this.modal.destroy(); + } +} diff --git a/angular-admin/src/app/routes/sys/announcement/announcement.component.html b/angular-admin/src/app/routes/sys/announcement/announcement.component.html new file mode 100644 index 00000000..0a8412dd --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement/announcement.component.html @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/angular-admin/src/app/routes/sys/announcement/announcement.component.ts b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts new file mode 100644 index 00000000..bd0cd73d --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts @@ -0,0 +1,195 @@ +import { ConfigStateService, CoreModule, LocalizationService, PermissionService } from '@abp/ng.core'; +import { Component, inject, OnInit, ViewChild } from '@angular/core'; +import { PageHeaderModule } from '@delon/abc/page-header'; +import { STChange, STColumn, STComponent, STModule, STPage } from '@delon/abc/st'; +import { DelonFormModule, SFSchema } from '@delon/form'; +import { ModalHelper } from '@delon/theme'; +import { AnnouncementService } from '@proxy/admin/controllers'; +import { GetAnnouncementsInput } from '@proxy/admin/announcements/models'; +import { NzButtonModule } from 'ng-zorro-antd/button'; +import { NzCardModule } from 'ng-zorro-antd/card'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; +import { tap } from 'rxjs/operators'; + +import { SysAnnouncementEditComponent } from './edit/edit.component'; + +@Component({ + selector: 'app-sys-announcement', + templateUrl: './announcement.component.html', + imports: [ + CoreModule, + PageHeaderModule, + DelonFormModule, + STModule, + NzCardModule, + NzButtonModule, + NzPopconfirmModule + ] +}) +export class SysAnnouncementComponent implements OnInit { + private modal = inject(ModalHelper); + private localizationService = inject(LocalizationService); + private messageService = inject(NzMessageService); + private permissionService = inject(PermissionService); + private announcementService = inject(AnnouncementService); + + announcements: any[]; + total: number; + loading = false; + params: GetAnnouncementsInput; + page: STPage = { + show: true, + showSize: true, + front: false, + pageSizes: [10, 20, 30, 40, 50] + }; + searchSchema: SFSchema = { + properties: { + title: { + type: 'string', + title: '', + ui: { + placeholder: this.localizationService.instant('Exam::Placeholder', this.localizationService.instant('Exam::Title')) + } + } + } + }; + @ViewChild('st', { static: false }) st: STComponent; + columns: STColumn[] = [ + { title: this.localizationService.instant('Exam::CategoryName'), index: 'categoryName' }, + { title: this.localizationService.instant('Exam::Title'), index: 'title' }, + { title: this.localizationService.instant('Exam::Content'), index: 'content' }, + { + title: this.localizationService.instant('Exam::IsPublished'), + index: 'isPublished', + type: 'yn' + }, + { title: this.localizationService.instant('Exam::PublishTime'), index: 'publishTime', type: 'date' }, + { title: this.localizationService.instant('Exam::ExpirationTime'), index: 'expirationTime', type: 'date' }, + { title: this.localizationService.instant('Exam::Sort'), index: 'sort' }, + + { + title: this.localizationService.instant('Exam::Actions'), + buttons: [ + { + icon: 'edit', + type: 'modal', + iif: (record: any) => { + return !record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Update'); + }, + modal: { + component: SysAnnouncementEditComponent, + params: (record: any) => ({ + announcementId: record.id + }) + }, + click: 'reload' + }, + { + icon: 'check', + text: this.localizationService.instant('Exam::Publish'), + iif: (record: any) => { + return !record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Publish'); + }, + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'primary' + }, + click: (record: any) => { + this.announcementService.publish(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::PublishedSuccessfully')); + this.st.reload(); + }); + } + }, + { + icon: 'close', + text: this.localizationService.instant('Exam::Unpublish'), + iif: (record: any) => { + return record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Unpublish'); + }, + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'primary' + }, + click: (record: any) => { + this.announcementService.unpublish(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::UnpublishedSuccessfully')); + this.st.reload(); + }); + } + }, + { + icon: 'delete', + type: 'del', + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'danger', + icon: 'star' + }, + iif: () => { + return this.permissionService.getGrantedPolicy('Exam.Announcements.Delete'); + }, + click: (record: any, _modal, component) => { + this.announcementService.delete(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::DeletedSuccessfully')); + // tslint:disable-next-line: no-non-null-assertion + component!.removeRow(record); + }); + } + } + ] + } + ]; + + ngOnInit() { + this.params = this.resetParameters(); + this.getList(); + } + + getList() { + this.loading = true; + this.announcementService + .getList(this.params) + .pipe(tap(() => (this.loading = false))) + .subscribe(response => ((this.announcements = response.items), (this.total = response.totalCount))); + } + + resetParameters(): GetAnnouncementsInput { + return { + skipCount: 0, + maxResultCount: 10, + sorting: 'Sort Asc' + }; + } + + change(e: STChange) { + if (e.type === 'pi' || e.type === 'ps') { + this.params.skipCount = (e.pi - 1) * e.ps; + this.params.maxResultCount = e.ps; + this.getList(); + } else if (e.type === 'sort') { + this.params.sorting = `${e.sort?.column?.index as string} ${e.sort.value === 'ascend' ? 'asc' : 'desc'}`; + this.getList(); + } + } + + reset() { + this.params = this.resetParameters(); + this.st.load(1); + } + + search(e) { + if (e.title) { + this.params.title = e.title; + } else { + delete this.params.title; + } + this.st.load(1); + } + + add() { + this.modal.createStatic(SysAnnouncementEditComponent, { announcementId: '' }).subscribe(() => this.st.reload()); + } +} diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html new file mode 100644 index 00000000..b00808ad --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html @@ -0,0 +1,90 @@ +@if (form) { + + + +} @else { + +} \ No newline at end of file diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts new file mode 100644 index 00000000..99c88fc3 --- /dev/null +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts @@ -0,0 +1,194 @@ +import { CoreModule, LocalizationService } from '@abp/ng.core'; +import { Component, OnInit, Input } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { AnnouncementService, AnnouncementCategoryService } from '@proxy/admin/controllers'; +import { AnnouncementDetailDto, AnnouncementCategoryListDto } from '@proxy/admin/announcements/models'; +import { NzButtonModule } from 'ng-zorro-antd/button'; +import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'; +import { NzFormModule } from 'ng-zorro-antd/form'; +import { NzInputModule } from 'ng-zorro-antd/input'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalModule, NzModalRef } from 'ng-zorro-antd/modal'; +import { NzSelectModule } from 'ng-zorro-antd/select'; +import { NzSpinModule } from 'ng-zorro-antd/spin'; +import { finalize, tap } from 'rxjs/operators'; +import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; +import { dateTimePickerUtil } from '@delon/util'; + +@Component({ + selector: 'app-sys-announcement-edit', + templateUrl: './edit.component.html', + imports: [ + CoreModule, + NzSpinModule, + NzModalModule, + NzFormModule, + NzInputModule, + NzInputNumberModule, + NzButtonModule, + NzDatePickerModule, + NzSelectModule + ] +}) +export class SysAnnouncementEditComponent implements OnInit { + @Input() + announcementId: string; + + announcement: AnnouncementDetailDto; + categories: AnnouncementCategoryListDto[] = []; + loading = false; + isConfirmLoading = false; + + form: FormGroup = null; + + constructor( + private fb: FormBuilder, + private modal: NzModalRef, + private messageService: NzMessageService, + private localizationService: LocalizationService, + private announcementService: AnnouncementService, + private categoryService: AnnouncementCategoryService + ) {} + + ngOnInit(): void { + this.loading = true; + this.categoryService.getList().subscribe(response => { + this.categories = response.items; + }); + + if (this.announcementId) { + this.announcementService + .get(this.announcementId) + .pipe( + tap(response => { + this.announcement = response; + this.buildForm(); + this.loading = false; + }) + ) + .subscribe(); + } else { + this.announcement = { + title: '', + content: '', + publishTime: null, + expirationTime: null, + sort: 0, + categoryId: null, + isPublished: false, + displayOrder: 0 + } as AnnouncementDetailDto; + this.buildForm(); + this.loading = false; + } + } + + buildForm() { + this.form = this.fb.group({ + title: [this.announcement?.title || '', [Validators.required]], + content: [this.announcement?.content || '', [Validators.required]], + publishTime: [this.announcement?.publishTime ? new Date(this.announcement.publishTime) : null], + expirationTime: [this.announcement?.expirationTime ? new Date(this.announcement.expirationTime) : null], + sort: [this.announcement?.sort ?? 0, [Validators.required, Validators.min(0)]], + categoryId: [this.announcement?.categoryId || null] + }); + + this.form.get('publishTime').valueChanges.subscribe(() => { + const expirationTimeControl = this.form.get('expirationTime'); + if (expirationTimeControl) { + expirationTimeControl.updateValueAndValidity(); + } + }); + } + + save() { + if (!this.form.valid || this.isConfirmLoading) { + for (const key of Object.keys(this.form.controls)) { + this.form.controls[key].markAsDirty(); + this.form.controls[key].updateValueAndValidity(); + } + return; + } + + const publishTime = this.form.get('publishTime').value; + const expirationTime = this.form.get('expirationTime').value; + + if (publishTime && expirationTime) { + const publishDate = new Date(publishTime); + const expireDate = new Date(expirationTime); + if (expireDate.getTime() <= publishDate.getTime()) { + this.messageService.warning(this.localizationService.instant('Exam::ExpirationTimeMustBeAfterPublishTime')); + return; + } + } + + this.isConfirmLoading = true; + + const formValue = this.form.value; + const data = { + ...formValue, + expirationTime: formValue.expirationTime ? dateTimePickerUtil.format(formValue.expirationTime, 'yyyy-MM-dd HH:mm') + ':00' : null, + publishTime: formValue.publishTime ? dateTimePickerUtil.format(formValue.publishTime, 'yyyy-MM-dd HH:mm') + ':00' : null + }; + + if (this.announcementId) { + this.announcementService + .update(this.announcementId, data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } else { + this.announcementService + .create(data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } + } + + close() { + this.modal.destroy(); + } + + /** + * 禁用今天的日期之前的日期(发布时间只能选今天或未来) + */ + disabledDateBeforeToday = (current: Date): boolean => { + if (!current) { + return false; + } + const today = new Date(); + today.setHours(0, 0, 0, 0); + const currentDate = new Date(current); + currentDate.setHours(0, 0, 0, 0); + return currentDate.getTime() < today.getTime(); + }; + + /** + * 禁用早于发布时间的日期(过期时间不能早于发布时间) + */ + disabledDateBeforePublishTime = (current: Date): boolean => { + if (!current) { + return false; + } + const publishTime = this.form?.get('publishTime')?.value; + if (!publishTime) { + return this.disabledDateBeforeToday(current); + } + const publishDate = new Date(publishTime); + publishDate.setHours(0, 0, 0, 0); + const currentDate = new Date(current); + currentDate.setHours(0, 0, 0, 0); + return currentDate.getTime() < publishDate.getTime(); + }; +} diff --git a/angular-admin/src/app/routes/sys/routes.ts b/angular-admin/src/app/routes/sys/routes.ts index 308ee362..b84ea360 100644 --- a/angular-admin/src/app/routes/sys/routes.ts +++ b/angular-admin/src/app/routes/sys/routes.ts @@ -3,6 +3,8 @@ import { Routes } from '@angular/router'; import { authJWTCanActivate } from '@delon/auth'; import { SysKnowledgePointComponent } from './knowledge-point/knowledge-point.component'; +import { SysAnnouncementComponent } from './announcement/announcement.component'; +import { SysAnnouncementCategoryComponent } from './announcement-category/announcement-category.component'; export const routes: Routes = [ { @@ -12,5 +14,21 @@ export const routes: Routes = [ data: { requiredPolicy: 'Exam.KnowledgePoints.Management' } + }, + { + path: 'announcement', + component: SysAnnouncementComponent, + canActivate: [authJWTCanActivate, permissionGuard], + data: { + requiredPolicy: 'Exam.Announcements' + } + }, + { + path: 'announcement-category', + component: SysAnnouncementCategoryComponent, + canActivate: [authJWTCanActivate, permissionGuard], + data: { + requiredPolicy: 'Exam.AnnouncementCategories' + } } ]; diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs index b64ce01e..908cd884 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCategoryListDto.cs @@ -7,7 +7,7 @@ public class AnnouncementCategoryListDto : FullAuditedEntityDto { public string Name { get; set; } - public int DisplayOrder { get; set; } + public int Sort { get; set; } public string? Remark { get; set; } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs index f3b96b77..a0aee19b 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs @@ -8,6 +8,8 @@ public class AnnouncementCreateOrUpdateDtoBase public string Content { get; set; } + public DateTime? PublishTime { get; set; } + public DateTime? ExpirationTime { get; set; } public int Sort { get; set; } diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs index 43c0dbce..27f220a0 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDtoValidator.cs @@ -1,13 +1,14 @@ using FluentValidation; using Microsoft.Extensions.Localization; using SuperAbp.Exam.Localization; +using Volo.Abp.Timing; namespace SuperAbp.Exam.Admin.Announcements; public class AnnouncementCreateDtoValidator : AbstractValidator { - public AnnouncementCreateDtoValidator(IStringLocalizer local) + public AnnouncementCreateDtoValidator(IStringLocalizer local, IClock clock) { - Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local)); + Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local, clock)); } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs index cfc4b2b0..0ef1b63d 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs @@ -1,14 +1,16 @@ using System; using FluentValidation; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using SuperAbp.Exam.Announcements; using SuperAbp.Exam.Localization; +using Volo.Abp.Timing; namespace SuperAbp.Exam.Admin.Announcements; public class AnnouncementCreateOrUpdateDtoBaseValidator : AbstractValidator { - public AnnouncementCreateOrUpdateDtoBaseValidator(IStringLocalizer local) + public AnnouncementCreateOrUpdateDtoBaseValidator(IStringLocalizer local, IClock clock) { RuleFor(x => x.Title) .NotEmpty() @@ -22,9 +24,19 @@ public AnnouncementCreateOrUpdateDtoBaseValidator(IStringLocalizer .MaximumLength(AnnouncementConsts.MaxContentLength) .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementConsts.MaxContentLength]); + RuleFor(x => x.PublishTime) + .Must((dto, publishTime) => clock.ConvertToUtc(publishTime.Value) >= clock.Now) + .WithMessage(local["Publish time must be in the future or now."]) + .When(x => x.PublishTime.HasValue); + RuleFor(x => x.ExpirationTime) - .Must((dto, expirationTime) => !expirationTime.HasValue || expirationTime.Value > DateTime.Now) + .Must((dto, expirationTime) => clock.ConvertToUtc(expirationTime.Value) > clock.Now) .WithMessage(local["Expiration time must be in the future."]) .When(x => x.ExpirationTime.HasValue); + + RuleFor(x => x) + .Must(dto => clock.ConvertToUtc(dto.PublishTime.Value) < clock.ConvertToUtc(dto.ExpirationTime.Value)) + .WithMessage(local["Expiration time must be after publish time."]) + .When(x => x.PublishTime.HasValue && x.ExpirationTime.HasValue); } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs index 00c9c824..62c9b681 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs @@ -36,7 +36,7 @@ public class AnnouncementListDto : FullAuditedEntityDto /// /// 显示顺序 /// - public int DisplayOrder { get; set; } + public int Sort { get; set; } /// /// 分类ID diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs index fa9c5c53..556045a9 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementUpdateDtoValidator.cs @@ -1,13 +1,14 @@ using FluentValidation; using Microsoft.Extensions.Localization; using SuperAbp.Exam.Localization; +using Volo.Abp.Timing; namespace SuperAbp.Exam.Admin.Announcements; public class AnnouncementUpdateDtoValidator : AbstractValidator { - public AnnouncementUpdateDtoValidator(IStringLocalizer local) + public AnnouncementUpdateDtoValidator(IStringLocalizer local, IClock clock) { - Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local)); + Include(new AnnouncementCreateOrUpdateDtoBaseValidator(local, clock)); } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs index ff90dedc..1fe3f737 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs @@ -58,6 +58,13 @@ public virtual async Task CreateAsync(AnnouncementCreateD input.CategoryId ); + announcement.ExpirationTime = input.ExpirationTime; + + if (input.PublishTime.HasValue) + { + announcement.SetPublishTime(input.PublishTime.Value); + } + await Repository.InsertAsync(announcement); return ObjectMapper.Map(announcement); } @@ -67,10 +74,25 @@ public virtual async Task UpdateAsync(Guid id, Announceme { var announcement = await Repository.GetAsync(id); + if (announcement.IsPublished) + { + throw new AnnouncementAlreadyPublishedException(); + } + announcement.Title = input.Title; announcement.Content = input.Content; announcement.Sort = input.Sort; announcement.CategoryId = input.CategoryId; + announcement.ExpirationTime = input.ExpirationTime; + + if (input.PublishTime.HasValue) + { + announcement.SetPublishTime(input.PublishTime.Value); + } + else + { + announcement.PublishTime = null; + } await Repository.UpdateAsync(announcement); return ObjectMapper.Map(announcement); @@ -80,7 +102,7 @@ public virtual async Task UpdateAsync(Guid id, Announceme public virtual async Task PublishAsync(Guid id) { var announcement = await Repository.GetAsync(id); - announcement.Publish(Clock.Now); + announcement.Publish(); await Repository.UpdateAsync(announcement); } diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs index f3d1bb15..5176ea96 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/ExamApplicationAdminAutoMapperProfile.cs @@ -12,7 +12,8 @@ public ExamApplicationAdminAutoMapperProfile() * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ CreateMap() - .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); + .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)) + .ForMember(dest => dest.Sort, opt => opt.MapFrom(src => src.Sort)); CreateMap() .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); CreateMap(); diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs deleted file mode 100644 index a6a4afc3..00000000 --- a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementAdminController.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using SuperAbp.Exam.Admin.Announcements; -using Volo.Abp; -using Volo.Abp.Application.Dtos; -using Volo.Abp.AspNetCore.Mvc; - -namespace SuperAbp.Exam.Admin.Controllers; - -[Route("api/announcements")] -public class AnnouncementAdminController : AbpController, IAnnouncementAdminAppService -{ - private readonly IAnnouncementAdminAppService _announcementAppService; - - public AnnouncementAdminController(IAnnouncementAdminAppService announcementAppService) - { - _announcementAppService = announcementAppService; - } - - [HttpGet("{id}")] - public async Task GetAsync(Guid id) - { - return await _announcementAppService.GetAsync(id); - } - - [HttpGet] - public async Task> GetListAsync(GetAnnouncementsInput input) - { - return await _announcementAppService.GetListAsync(input); - } - - [HttpPost] - public async Task CreateAsync(AnnouncementCreateDto input) - { - return await _announcementAppService.CreateAsync(input); - } - - [HttpPut("{id}")] - public async Task UpdateAsync(Guid id, AnnouncementUpdateDto input) - { - return await _announcementAppService.UpdateAsync(id, input); - } - - [HttpPatch("{id}/publish")] - public async Task PublishAsync(Guid id) - { - await _announcementAppService.PublishAsync(id); - } - - [HttpPatch("{id}/unpublish")] - public async Task UnpublishAsync(Guid id) - { - await _announcementAppService.UnpublishAsync(id); - } - - [HttpDelete("{id}")] - public async Task DeleteAsync(Guid id) - { - await _announcementAppService.DeleteAsync(id); - } -} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryController.cs similarity index 87% rename from aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs rename to aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryController.cs index 308dd2a8..03cdbda6 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryAdminController.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementCategoryController.cs @@ -2,14 +2,13 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using SuperAbp.Exam.Admin.Announcements; -using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.AspNetCore.Mvc; namespace SuperAbp.Exam.Admin.Controllers; [Route("api/announcement-categories")] -public class AnnouncementCategoryAdminController(IAnnouncementCategoryAdminAppService categoryAppService) : AbpController, IAnnouncementCategoryAdminAppService +public class AnnouncementCategoryController(IAnnouncementCategoryAdminAppService categoryAppService) : AbpController, IAnnouncementCategoryAdminAppService { protected IAnnouncementCategoryAdminAppService CategoryAppService { get; } = categoryAppService; diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementController.cs b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementController.cs new file mode 100644 index 00000000..a27495ae --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.HttpApi/Controllers/AnnouncementController.cs @@ -0,0 +1,57 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using SuperAbp.Exam.Admin.Announcements; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace SuperAbp.Exam.Admin.Controllers; + +[Route("api/announcements")] +public class AnnouncementController(IAnnouncementAdminAppService announcementAppService) : AbpController, IAnnouncementAdminAppService +{ + protected IAnnouncementAdminAppService AnnouncementAppService { get; } = announcementAppService; + + [HttpGet("{id}")] + public async Task GetAsync(Guid id) + { + return await AnnouncementAppService.GetAsync(id); + } + + [HttpGet] + public virtual async Task> GetListAsync(GetAnnouncementsInput input) + { + return await AnnouncementAppService.GetListAsync(input); + } + + [HttpPost] + public virtual async Task CreateAsync(AnnouncementCreateDto input) + { + return await AnnouncementAppService.CreateAsync(input); + } + + [HttpPut("{id}")] + public virtual async Task UpdateAsync(Guid id, AnnouncementUpdateDto input) + { + return await AnnouncementAppService.UpdateAsync(id, input); + } + + [HttpPatch("{id}/publish")] + public virtual async Task PublishAsync(Guid id) + { + await AnnouncementAppService.PublishAsync(id); + } + + [HttpPatch("{id}/unpublish")] + public virtual async Task UnpublishAsync(Guid id) + { + await AnnouncementAppService.UnpublishAsync(id); + } + + [HttpDelete("{id}")] + public virtual async Task DeleteAsync(Guid id) + { + await AnnouncementAppService.DeleteAsync(id); + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs index 9734e933..fedcba7a 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts.Shared/Permissions/ExamPermissionDefinitionProvider.cs @@ -51,16 +51,16 @@ public override void Define(IPermissionDefinitionContext context) exams.AddChild(ExamPermissions.Exams.Delete, L("Permission:Delete")); var announcements = myGroup.AddPermission(ExamPermissions.Announcements.Default, L("Permission:Announcements")); - exams.AddChild(ExamPermissions.Announcements.Create, L("Permission:Create")); - exams.AddChild(ExamPermissions.Announcements.Update, L("Permission:Edit")); - exams.AddChild(ExamPermissions.Announcements.Publish, L("Permission:Publish")); - exams.AddChild(ExamPermissions.Announcements.Unpublish, L("Permission:Unpublish")); - exams.AddChild(ExamPermissions.Announcements.Delete, L("Permission:Delete")); + announcements.AddChild(ExamPermissions.Announcements.Create, L("Permission:Create")); + announcements.AddChild(ExamPermissions.Announcements.Update, L("Permission:Edit")); + announcements.AddChild(ExamPermissions.Announcements.Publish, L("Permission:Publish")); + announcements.AddChild(ExamPermissions.Announcements.Unpublish, L("Permission:Unpublish")); + announcements.AddChild(ExamPermissions.Announcements.Delete, L("Permission:Delete")); var announcementCategories = myGroup.AddPermission(ExamPermissions.AnnouncementCategories.Default, L("Permission:AnnouncementCategories")); - exams.AddChild(ExamPermissions.AnnouncementCategories.Create, L("Permission:Create")); - exams.AddChild(ExamPermissions.AnnouncementCategories.Update, L("Permission:Edit")); - exams.AddChild(ExamPermissions.AnnouncementCategories.Delete, L("Permission:Delete")); + announcementCategories.AddChild(ExamPermissions.AnnouncementCategories.Create, L("Permission:Create")); + announcementCategories.AddChild(ExamPermissions.AnnouncementCategories.Update, L("Permission:Edit")); + announcementCategories.AddChild(ExamPermissions.AnnouncementCategories.Delete, L("Permission:Delete")); } private static LocalizableString L(string name) diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs index b1d8de03..9305b476 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementCategoryDto.cs @@ -20,7 +20,7 @@ public class AnnouncementCategoryDto /// /// 显示顺序 /// - public int DisplayOrder { get; set; } + public int Sort { get; set; } /// /// 备注 @@ -31,4 +31,4 @@ public class AnnouncementCategoryDto /// 创建时间 /// public DateTime CreationTime { get; set; } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs new file mode 100644 index 00000000..1a527957 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs @@ -0,0 +1,134 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using SuperAbp.Exam.Announcements; +using System; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.BackgroundWorkers; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; +using Volo.Abp.Timing; +using Volo.Abp.TenantManagement; +using Volo.Abp.Uow; + +namespace SuperAbp.Exam.BackgroundServices.Announcements; + +/// +/// 公告自动发布和过期处理后台任务 +/// +public class AnnouncementAutoPublishWorker : AsyncPeriodicBackgroundWorkerBase +{ + public AnnouncementAutoPublishWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory) + : base(timer, serviceScopeFactory) + { + Timer.Period = 60000; + timer.RunOnStart = true; + } + + [UnitOfWork(isTransactional: false)] + protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) + { + var logger = workerContext.ServiceProvider.GetRequiredService>(); + var clock = workerContext.ServiceProvider.GetRequiredService(); + + logger.LogInformation("Started announcement auto publish..."); + + await ProcessAnnouncementsAsync(workerContext); + logger.LogInformation("Successfully completed host announcement auto publish."); + + ITenantRepository tenantRepository = workerContext.ServiceProvider.GetRequiredService(); + ICurrentTenant currentTenant = workerContext.ServiceProvider.GetRequiredService(); + var tenants = await tenantRepository.GetListAsync(); + foreach (var tenant in tenants) + { + using (currentTenant.Change(tenant.Id)) + { + await ProcessAnnouncementsAsync(workerContext); + } + + logger.LogInformation($"Successfully completed {tenant.Name} tenant announcement auto publish."); + } + + logger.LogInformation("Successfully completed all announcement auto publish."); + } + + private async Task ProcessAnnouncementsAsync(PeriodicBackgroundWorkerContext workerContext) + { + var logger = workerContext.ServiceProvider.GetRequiredService>(); + var repository = workerContext.ServiceProvider.GetRequiredService(); + var clock = workerContext.ServiceProvider.GetRequiredService(); + + logger.LogInformation("AnnouncementAutoPublishWorker started at {Time}", clock.Now); + + try + { + await PublishScheduledAnnouncementsAsync(repository, clock, logger); + + await ExpireAnnouncementsAsync(repository, clock, logger); + + logger.LogInformation("AnnouncementAutoPublishWorker completed at {Time}", clock.Now); + } + catch (Exception ex) + { + logger.LogError(ex, "Error in AnnouncementAutoPublishWorker at {Time}", clock.Now); + } + } + + /// + /// 发布定时公告 + /// + private async Task PublishScheduledAnnouncementsAsync( + IAnnouncementRepository repository, + IClock clock, + ILogger logger) + { + var queryable = await repository.GetQueryableAsync(); + var now = clock.Now; + + var toPublish = await queryable + .Where(a => !a.IsPublished && a.PublishTime.HasValue && a.PublishTime.Value <= now) + .ToListAsync(); + + if (toPublish.Any()) + { + logger.LogInformation("Found {Count} announcements to publish", toPublish.Count); + + foreach (var announcement in toPublish) + { + announcement.Publish(); + await repository.UpdateAsync(announcement); + logger.LogInformation("Published announcement {Id}: {Title}", announcement.Id, announcement.Title); + } + } + } + + /// + /// 处理过期公告 + /// + private async Task ExpireAnnouncementsAsync( + IAnnouncementRepository repository, + IClock clock, + ILogger logger) + { + var queryable = await repository.GetQueryableAsync(); + var now = clock.Now; + + var toExpire = await queryable + .Where(a => a.IsPublished && a.ExpirationTime.HasValue && a.ExpirationTime.Value <= now) + .ToListAsync(); + + if (toExpire.Any()) + { + logger.LogInformation("Found {Count} announcements to expire", toExpire.Count); + + foreach (var announcement in toExpire) + { + announcement.Unpublish(); + await repository.UpdateAsync(announcement); + logger.LogInformation("Expired announcement {Id}: {Title}", announcement.Id, announcement.Title); + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.BackgroundServices/ExamBackgroundServicesModule.cs b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/ExamBackgroundServicesModule.cs index 46735ff5..c74a3171 100644 --- a/aspnet-core/src/SuperAbp.Exam.BackgroundServices/ExamBackgroundServicesModule.cs +++ b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/ExamBackgroundServicesModule.cs @@ -1,5 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using SuperAbp.Exam.BackgroundServices.Announcements; using SuperAbp.Exam.BackgroundServices.Exams; using SuperAbp.Exam.EntityFrameworkCore; using Volo.Abp; @@ -29,5 +30,6 @@ public override void OnApplicationInitialization(ApplicationInitializationContex context.AddBackgroundWorkerAsync(); context.AddBackgroundWorkerAsync(); context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/ExamDomainErrorCodes.cs b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/ExamDomainErrorCodes.cs index b1844be5..c0128610 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/ExamDomainErrorCodes.cs +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/ExamDomainErrorCodes.cs @@ -42,10 +42,15 @@ public static class UserExams public const string MaxNumberOfTimesExceeded = "Exam:UserExams:0004"; } + public static class Announcements + { + public const string CannotUpdatePublished = "Exam:Announcement:0001"; + } + public static class Exams { public const string OutOfExamTime = "Exam:Exams:0001"; public const string InvalidStatus = "Exam:Exams:0002"; public const string UnfinishedGrading = "Exam:Exams:0003"; } -} \ No newline at end of file +} diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json index 90328f32..a796402b 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json @@ -5,6 +5,29 @@ "Welcome": "Welcome", "TotalScore{0}": "Total {0} Score", "TotalQuestionCount{0}": "Total {0} Count", - "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." + "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.", + "NewAnnouncement": "New Announcement", + "NewAnnouncementCategory": "New Announcement Category", + "EditAnnouncement": "Edit Announcement", + "EditAnnouncementCategory": "Edit Announcement Category", + "IsPublished": "Is Published", + "PublishTime": "Publish Time", + "ExpirationTime": "Expiration Time", + "ExpirationTimeMustBeAfterPublishTime": "Expiration time must be after publish time", + "Sort": "Sort", + "DisplayOrder": "Display Order", + "CategoryName": "Category Name", + "Category": "Category", + "SelectCategory": "Select Category", + "SelectExpirationTime": "Select Expiration Time", + "PublishedSuccessfully": "Published Successfully", + "UnpublishedSuccessfully": "Unpublished Successfully", + "Announcements": "Announcements", + "AnnouncementCategories": "Announcement Categories", + "Permission:Announcements": "Announcement Management", + "Permission:AnnouncementCategories": "Announcement Category Management", + "Permission:Announcements.Publish": "Publish Announcement", + "Permission:Announcements.Unpublish": "Unpublish Announcement", + "Exam:Announcement:0001": "Cannot update published announcement" } -} \ No newline at end of file +} diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json index 15ca2c19..60adad5d 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json @@ -9,6 +9,8 @@ "Menu:MyMistake": "我的错题", "Menu:OnlineExam": "在线考试", "Menu:QuestionBank": "题库", + "Menu:Announcement": "公告", + "Menu:AnnouncementCategory": "公告分类", "MyExam": "我的考试", "MyFavorite": "我的收藏", "MyMistake": "我的错题", @@ -137,6 +139,17 @@ "Only one answer.": "只有一个正确答案。", "Least one answer.": "至少有一个正确答案。", "Tips": "提示", + "EditAnnouncement": "编辑公告", + "IsPublished": "是否发布", + "PublishTime": "发布时间", + "ExpirationTime": "过期时间", + "ExpirationTimeMustBeAfterPublishTime": "过期时间必须晚于发布时间", + "CategoryName": "分类名称", + "Category": "分类", + "PublishedSuccessfully": "发布成功", + "UnpublishedSuccessfully": "下架成功", + "Announcements": "公告", + "AnnouncementCategories": "公告分类", "Import": "导入", "StartExam": "开始考试", "EnterExam": "进入考试", @@ -149,6 +162,7 @@ "Search": "搜索", "Reset": "重置", "Publish": "发布", + "Unpublish": "取消发布", "Previous": "上一题", "Next": "下一题", "AddRule": "添加规则", @@ -159,6 +173,9 @@ "NewKnowledgePoint": "新知识点", "NewPaper": "新试卷", "NewExam": "新考试", + "NewAnnouncement": "新公告", + "NewAnnouncementCategory": "新公告分类", + "ManageCategories": "管理分类", "Permission:ExamManagement": "考试管理", "Permission:QuestionBanks": "题库", "Permission:Questions": "问题", @@ -173,11 +190,16 @@ "Permission:Complete": "完成", "Permission:Create": "创建", "Permission:Publish": "发布", + "Permission:Unpublish": "取消发布", "Permission:Cancel": "取消", "Permission:Invalidate": "作废", "Permission:Import": "导入", "Permission:Edit": "修改", "Permission:Delete": "删除", + "Permission:Announcements": "公告管理", + "Permission:AnnouncementCategories": "公告分类管理", + "Permission:Announcements.Publish": "发布公告", + "Permission:Announcements.Unpublish": "下架公告", "Exam:Question:0001": "问题已存在", "Exam:Question:0002": "问题的正确答案数量不正确", "Exam:Question:0003": "数量不足,抽提失败", @@ -192,6 +214,7 @@ "Exam:UserExams:0004": "您已达到本场考试最大次数限制", "Exam:Exams:0001": "不在考试时间内", "Exam:Exams:0002": "考试状态无效", - "Exam:Exams:0003": "存在未完成评分的考试" + "Exam:Exams:0003": "存在未完成评分的考试", + "Exam:Announcement:0001": "已发布的公告不能修改" } -} \ No newline at end of file +} diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs index 37a4e59b..d09f8443 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs @@ -14,12 +14,12 @@ protected Announcement() { } [SetsRequiredMembers] - public Announcement(Guid id, string title, string content, int displayOrder = 0, Guid? categoryId = null) + public Announcement(Guid id, string title, string content, int sort = 0, Guid? categoryId = null) : base(id) { Title = title; Content = content; - Sort = displayOrder; + Sort = sort; CategoryId = categoryId; IsPublished = false; } @@ -69,7 +69,7 @@ public Announcement(Guid id, string title, string content, int displayOrder = 0, /// /// 发布 /// - public void Publish(DateTime publishTime) + public void Publish() { if (IsPublished) { @@ -77,6 +77,17 @@ public void Publish(DateTime publishTime) } IsPublished = true; + } + + /// + /// 设置发布时间 + /// + public void SetPublishTime(DateTime publishTime) + { + if (IsPublished) + { + return; + } PublishTime = publishTime; } @@ -86,7 +97,6 @@ public void Publish(DateTime publishTime) public void Unpublish() { IsPublished = false; - PublishTime = null; } /// diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementAlreadyPublishedException.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementAlreadyPublishedException.cs new file mode 100644 index 00000000..e1d276ad --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/AnnouncementAlreadyPublishedException.cs @@ -0,0 +1,11 @@ +using Volo.Abp; + +namespace SuperAbp.Exam.Announcements; + +public class AnnouncementAlreadyPublishedException : BusinessException +{ + public AnnouncementAlreadyPublishedException() + : base(code: ExamDomainErrorCodes.Announcements.CannotUpdatePublished) + { + } +} diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs index 28037b77..fa2886d6 100644 --- a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs @@ -82,7 +82,7 @@ public async Task Should_Publish() var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement4Id); updatedAnnouncement.IsPublished.ShouldBeTrue(); - updatedAnnouncement.PublishTime.ShouldNotBeNull(); + updatedAnnouncement.PublishTime.ShouldBeNull(); } [Fact] @@ -92,7 +92,7 @@ public async Task Should_Unpublish() var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement1Id); updatedAnnouncement.IsPublished.ShouldBeFalse(); - updatedAnnouncement.PublishTime.ShouldBeNull(); + updatedAnnouncement.PublishTime.ShouldNotBeNull(); } [Fact] diff --git a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs index ca359d8a..f1ebd0ce 100644 --- a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs +++ b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs @@ -172,7 +172,8 @@ private async Task CreateAnnouncementAsync() 1, testData.AnnouncementCategory1Id ); - announcement1.Publish(DateTime.Now.AddDays(-1)); + announcement1.PublishTime = DateTime.Now.AddDays(-1); + announcement1.Publish(); var announcement2 = new Announcement( testData.Announcement2Id, @@ -181,7 +182,8 @@ private async Task CreateAnnouncementAsync() 2, testData.AnnouncementCategory2Id ); - announcement2.Publish(DateTime.Now); + announcement2.PublishTime = DateTime.Now; + announcement2.Publish(); var announcement3 = new Announcement( testData.Announcement3Id, @@ -190,7 +192,8 @@ private async Task CreateAnnouncementAsync() 3, testData.AnnouncementCategory1Id ); - announcement3.Publish(DateTime.Now.AddHours(-2)); + announcement3.PublishTime = DateTime.Now.AddHours(-2); + announcement3.Publish(); var announcement4 = new Announcement( testData.Announcement4Id, From 101cf41fc4d3966743217b09fb41974a28ca7853 Mon Sep 17 00:00:00 2001 From: snow Date: Mon, 9 Feb 2026 15:40:13 +0800 Subject: [PATCH 3/6] web list --- .../announcement/announcement.component.ts | 3 +- .../sys/announcement/edit/edit.component.html | 11 +- .../sys/announcement/edit/edit.component.ts | 55 +- .../announcement-detail.component.html | 43 ++ .../announcement-detail.component.scss | 0 .../announcement-detail.component.ts | 55 ++ .../announcement-detail/index.ts | 1 + .../announcements.component.html | 42 ++ .../announcements.component.scss | 15 + .../announcements/announcements.component.ts | 50 ++ angular-web/src/app/announcements/index.ts | 1 + angular-web/src/app/announcements/routes.ts | 18 + angular-web/src/app/app.routes.ts | 5 + .../src/app/exams/exams.component.html | 30 +- .../announcements/announcement.service.ts | 29 + .../src/app/proxy/announcements/index.ts | 2 + .../src/app/proxy/announcements/models.ts | 15 + .../proxy/controllers/examination.service.ts | 56 +- .../app/proxy/exam-management/exams/models.ts | 2 +- .../exam-management/user-exams/models.ts | 4 + angular-web/src/app/proxy/generate-proxy.json | 494 ++++++++++++++++++ angular-web/src/app/proxy/index.ts | 3 +- angular-web/src/app/route.provider.ts | 10 +- .../Announcements/AnnouncementCreateDto.cs | 17 - .../AnnouncementCreateOrUpdateDtoBase.cs | 19 + .../AnnouncementAdminAppService.cs | 11 + ...ncementDto.cs => AnnouncementDetailDto.cs} | 6 +- .../Announcements/AnnouncementListDto.cs | 30 ++ .../Announcements/IAnnouncementAppService.cs | 4 +- .../Announcements/AnnouncementAppService.cs | 12 +- .../ExamApplicationAutoMapper.cs | 30 +- .../Announcements/Announcement.cs | 10 +- .../Announcements/AnnouncementRepository.cs | 8 +- .../Announcements/AnnouncementController.cs | 8 +- 34 files changed, 984 insertions(+), 115 deletions(-) create mode 100644 angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html create mode 100644 angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss create mode 100644 angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts create mode 100644 angular-web/src/app/announcements/announcement-detail/index.ts create mode 100644 angular-web/src/app/announcements/announcements.component.html create mode 100644 angular-web/src/app/announcements/announcements.component.scss create mode 100644 angular-web/src/app/announcements/announcements.component.ts create mode 100644 angular-web/src/app/announcements/index.ts create mode 100644 angular-web/src/app/announcements/routes.ts create mode 100644 angular-web/src/app/proxy/announcements/announcement.service.ts create mode 100644 angular-web/src/app/proxy/announcements/index.ts create mode 100644 angular-web/src/app/proxy/announcements/models.ts create mode 100644 aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs rename aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/{AnnouncementDto.cs => AnnouncementDetailDto.cs} (82%) create mode 100644 aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementListDto.cs diff --git a/angular-admin/src/app/routes/sys/announcement/announcement.component.ts b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts index bd0cd73d..f8dc3e22 100644 --- a/angular-admin/src/app/routes/sys/announcement/announcement.component.ts +++ b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts @@ -59,7 +59,6 @@ export class SysAnnouncementComponent implements OnInit { columns: STColumn[] = [ { title: this.localizationService.instant('Exam::CategoryName'), index: 'categoryName' }, { title: this.localizationService.instant('Exam::Title'), index: 'title' }, - { title: this.localizationService.instant('Exam::Content'), index: 'content' }, { title: this.localizationService.instant('Exam::IsPublished'), index: 'isPublished', @@ -76,7 +75,7 @@ export class SysAnnouncementComponent implements OnInit { icon: 'edit', type: 'modal', iif: (record: any) => { - return !record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Update'); + return this.permissionService.getGrantedPolicy('Exam.Announcements.Update'); }, modal: { component: SysAnnouncementEditComponent, diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html index b00808ad..3a7eedd1 100644 --- a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html @@ -38,8 +38,7 @@ {{ 'Exam::Content' | abpLocalization }} - + @if (control.hasError('required')) { {{ 'Exam::ThisFieldIsRequired.' | abpLocalization }} @@ -81,7 +80,13 @@ diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts index 99c88fc3..a3374705 100644 --- a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts @@ -1,8 +1,10 @@ import { CoreModule, LocalizationService } from '@abp/ng.core'; -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { I18NService } from '@core'; import { AnnouncementService, AnnouncementCategoryService } from '@proxy/admin/controllers'; import { AnnouncementDetailDto, AnnouncementCategoryListDto } from '@proxy/admin/announcements/models'; +import { EditorComponent, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular'; import { NzButtonModule } from 'ng-zorro-antd/button'; import { NzDatePickerModule } from 'ng-zorro-antd/date-picker'; import { NzFormModule } from 'ng-zorro-antd/form'; @@ -18,6 +20,7 @@ import { dateTimePickerUtil } from '@delon/util'; @Component({ selector: 'app-sys-announcement-edit', templateUrl: './edit.component.html', + providers: [{ provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' }], imports: [ CoreModule, NzSpinModule, @@ -27,7 +30,8 @@ import { dateTimePickerUtil } from '@delon/util'; NzInputNumberModule, NzButtonModule, NzDatePickerModule, - NzSelectModule + NzSelectModule, + EditorComponent ] }) export class SysAnnouncementEditComponent implements OnInit { @@ -40,15 +44,40 @@ export class SysAnnouncementEditComponent implements OnInit { isConfirmLoading = false; form: FormGroup = null; + init: EditorComponent['init'] = { + base_url: '/tinymce', + suffix: '.min', + plugins: 'preview fullscreen link table lists image media code', + toolbar: + 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | forecolor backcolor removeformat | link image media table | fullscreen preview code', + toolbar_mode: 'sliding', + height: 300, + menubar: false, + branding: false + }; + + private fb = inject(FormBuilder); + private modal = inject(NzModalRef); + private messageService = inject(NzMessageService); + private localizationService = inject(LocalizationService); + private announcementService = inject(AnnouncementService); + private categoryService = inject(AnnouncementCategoryService); + private i18n = inject(I18NService); + + constructor() { + if (this.i18n.defaultLang === 'zh-CN') { + this.init['language'] = 'zh_CN'; + this.init['language_url'] = '/assets/tinymce/langs/zh_CN.js'; + } + } - constructor( - private fb: FormBuilder, - private modal: NzModalRef, - private messageService: NzMessageService, - private localizationService: LocalizationService, - private announcementService: AnnouncementService, - private categoryService: AnnouncementCategoryService - ) {} + get canPublish() :boolean { + return !this.form?.get('publishTime')?.value; + } + + get canSave(): boolean { + return !this.announcement?.isPublished; + } ngOnInit(): void { this.loading = true; @@ -101,7 +130,7 @@ export class SysAnnouncementEditComponent implements OnInit { }); } - save() { + save(publish: boolean = false) { if (!this.form.valid || this.isConfirmLoading) { for (const key of Object.keys(this.form.controls)) { this.form.controls[key].markAsDirty(); @@ -112,6 +141,9 @@ export class SysAnnouncementEditComponent implements OnInit { const publishTime = this.form.get('publishTime').value; const expirationTime = this.form.get('expirationTime').value; + if(publishTime) { + publish = false; + } if (publishTime && expirationTime) { const publishDate = new Date(publishTime); @@ -127,6 +159,7 @@ export class SysAnnouncementEditComponent implements OnInit { const formValue = this.form.value; const data = { ...formValue, + publish: publish, expirationTime: formValue.expirationTime ? dateTimePickerUtil.format(formValue.expirationTime, 'yyyy-MM-dd HH:mm') + ':00' : null, publishTime: formValue.publishTime ? dateTimePickerUtil.format(formValue.publishTime, 'yyyy-MM-dd HH:mm') + ':00' : null }; diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html new file mode 100644 index 00000000..d9ee8a06 --- /dev/null +++ b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html @@ -0,0 +1,43 @@ +
+
+
+ + + @if (error) { + + {{ error }} + + } + + @if (loading) { +
+
+ 加载中... +
+
+ } @else if (announcement) { +
+
+
+

{{ announcement.title }}

+ @if (announcement.categoryName) { + {{ announcement.categoryName }} + } +
+
+
+
+ +
+ } +
+
+
\ No newline at end of file diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts new file mode 100644 index 00000000..13cc138e --- /dev/null +++ b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts @@ -0,0 +1,55 @@ +import { Component, OnInit, inject } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; +import { AnnouncementService } from '@proxy/announcements'; +import { AnnouncementDetailDto } from '@proxy/announcements'; + +@Component({ + selector: 'app-announcement-detail', + templateUrl: './announcement-detail.component.html', + styleUrls: ['./announcement-detail.component.scss'], + imports: [CommonModule, NgbAlertModule], + standalone: true, +}) +export class AnnouncementDetailComponent implements OnInit { + private announcementService = inject(AnnouncementService); + private route = inject(ActivatedRoute); + private router = inject(Router); + + announcement: AnnouncementDetailDto | null = null; + loading = false; + error: string | null = null; + + ngOnInit() { + const id = this.route.snapshot.paramMap.get('id'); + if (id) { + this.loadAnnouncement(id); + } else { + this.error = '公告ID不存在'; + } + } + + loadAnnouncement(id: string) { + this.loading = true; + this.error = null; + + this.announcementService + .get(id) + .subscribe({ + next: (result: AnnouncementDetailDto) => { + this.announcement = result; + this.loading = false; + }, + error: (err) => { + console.error('加载公告失败', err); + this.error = '公告不存在或已被删除'; + this.loading = false; + } + }); + } + + goBack() { + this.router.navigate(['/announcements']); + } +} diff --git a/angular-web/src/app/announcements/announcement-detail/index.ts b/angular-web/src/app/announcements/announcement-detail/index.ts new file mode 100644 index 00000000..080e7cb7 --- /dev/null +++ b/angular-web/src/app/announcements/announcement-detail/index.ts @@ -0,0 +1 @@ +export * from './announcement-detail.component'; diff --git a/angular-web/src/app/announcements/announcements.component.html b/angular-web/src/app/announcements/announcements.component.html new file mode 100644 index 00000000..0d9dc293 --- /dev/null +++ b/angular-web/src/app/announcements/announcements.component.html @@ -0,0 +1,42 @@ +
+
+
+
+

{{ '::Announcements' | abpLocalization }}

+
+ + @if (error) { + + {{ error }} + + } + + @if (loading) { +
+
+ {{ '::Loading' | abpLocalization }} +
+
+ } @else if (announcements.length === 0) { +
+ +

暂无公告

+
+ } @else { + + } +
+
+
\ No newline at end of file diff --git a/angular-web/src/app/announcements/announcements.component.scss b/angular-web/src/app/announcements/announcements.component.scss new file mode 100644 index 00000000..1dbec4d3 --- /dev/null +++ b/angular-web/src/app/announcements/announcements.component.scss @@ -0,0 +1,15 @@ +.list-group-item { + cursor: pointer; +} + +.announcement-preview { + font-size: 0.875rem; + color: #6c757d; + line-height: 1.5; + + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: ellipsis; +} \ No newline at end of file diff --git a/angular-web/src/app/announcements/announcements.component.ts b/angular-web/src/app/announcements/announcements.component.ts new file mode 100644 index 00000000..49d76721 --- /dev/null +++ b/angular-web/src/app/announcements/announcements.component.ts @@ -0,0 +1,50 @@ +import { Component, OnInit, inject } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; +import { AnnouncementService } from '@proxy/announcements'; +import { CoreModule, ListResultDto } from '@abp/ng.core'; +import { AnnouncementListDto } from '@proxy/announcements'; + +@Component({ + selector: 'app-announcements', + templateUrl: './announcements.component.html', + styleUrls: ['./announcements.component.scss'], + imports: [ + CoreModule, + CommonModule, + NgbAlertModule, + RouterLink + ], + standalone: true, +}) +export class AnnouncementsComponent implements OnInit { + private announcementService = inject(AnnouncementService); + + announcements: AnnouncementListDto[] = []; + loading = false; + error: string | null = null; + + ngOnInit() { + this.loadAnnouncements(); + } + + loadAnnouncements() { + this.loading = true; + this.error = null; + + this.announcementService + .getEffectiveList() + .subscribe({ + next: (result: ListResultDto) => { + this.announcements = result.items || []; + this.loading = false; + }, + error: (err) => { + console.error('加载公告失败', err); + this.error = '加载公告失败,请稍后重试'; + this.loading = false; + } + }); + } +} diff --git a/angular-web/src/app/announcements/index.ts b/angular-web/src/app/announcements/index.ts new file mode 100644 index 00000000..756b9e62 --- /dev/null +++ b/angular-web/src/app/announcements/index.ts @@ -0,0 +1 @@ +export * from './announcements.component'; diff --git a/angular-web/src/app/announcements/routes.ts b/angular-web/src/app/announcements/routes.ts new file mode 100644 index 00000000..e5006b4b --- /dev/null +++ b/angular-web/src/app/announcements/routes.ts @@ -0,0 +1,18 @@ +import { Routes } from '@angular/router'; +import { authGuard } from '@abp/ng.core'; +import { AnnouncementsComponent } from './announcements.component'; +import { AnnouncementDetailComponent } from './announcement-detail'; + +export const routes: Routes = [ + { + path: '', + pathMatch: 'full', + component: AnnouncementsComponent, + canActivate: [authGuard], + }, + { + path: ':id', + component: AnnouncementDetailComponent, + canActivate: [authGuard], + }, +]; diff --git a/angular-web/src/app/app.routes.ts b/angular-web/src/app/app.routes.ts index 98a291b0..cd68d691 100644 --- a/angular-web/src/app/app.routes.ts +++ b/angular-web/src/app/app.routes.ts @@ -27,4 +27,9 @@ export const APP_ROUTES: Routes = [ loadChildren: () => import('./my/routes').then(m => m.routes), canActivate: [authGuard], }, + { + path: 'announcements', + loadChildren: () => import('./announcements/routes').then(m => m.routes), + canActivate: [authGuard], + }, ]; diff --git a/angular-web/src/app/exams/exams.component.html b/angular-web/src/app/exams/exams.component.html index b6d49b08..d6b9aef3 100644 --- a/angular-web/src/app/exams/exams.component.html +++ b/angular-web/src/app/exams/exams.component.html @@ -1,7 +1,7 @@ @if (unfinishedExam) { - - 存在未完成的考试,立即进入 - + + 存在未完成的考试,立即进入 + }
@@ -13,13 +13,9 @@
{{ '::Menu:OnlineExam' | abpLocalization }}
- + (keyup.enter)="search()" />
@@ -52,20 +48,16 @@
{{ '::Menu:OnlineExam' | abpLocalization }}
- + @if (isExamAvailable(row)) { - + }
-
+
\ No newline at end of file diff --git a/angular-web/src/app/proxy/announcements/announcement.service.ts b/angular-web/src/app/proxy/announcements/announcement.service.ts new file mode 100644 index 00000000..23caa3ef --- /dev/null +++ b/angular-web/src/app/proxy/announcements/announcement.service.ts @@ -0,0 +1,29 @@ +import type { AnnouncementDetailDto, AnnouncementListDto } from './models'; +import { RestService, Rest } from '@abp/ng.core'; +import type { ListResultDto } from '@abp/ng.core'; +import { Injectable, inject } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class AnnouncementService { + private restService = inject(RestService); + apiName = 'Default'; + + + get = (id: string, config?: Partial) => + this.restService.request({ + method: 'GET', + url: `/api/exam/announcements/${id}`, + }, + { apiName: this.apiName,...config }); + + + getEffectiveList = (categoryId?: string, config?: Partial) => + this.restService.request>({ + method: 'GET', + url: '/api/exam/announcements/effective', + params: { categoryId }, + }, + { apiName: this.apiName,...config }); +} \ No newline at end of file diff --git a/angular-web/src/app/proxy/announcements/index.ts b/angular-web/src/app/proxy/announcements/index.ts new file mode 100644 index 00000000..447b4d46 --- /dev/null +++ b/angular-web/src/app/proxy/announcements/index.ts @@ -0,0 +1,2 @@ +export * from './announcement.service'; +export * from './models'; diff --git a/angular-web/src/app/proxy/announcements/models.ts b/angular-web/src/app/proxy/announcements/models.ts new file mode 100644 index 00000000..2d1e9044 --- /dev/null +++ b/angular-web/src/app/proxy/announcements/models.ts @@ -0,0 +1,15 @@ +import type { EntityDto } from '@abp/ng.core'; + +export interface AnnouncementDetailDto extends EntityDto { + title?: string; + content?: string; + categoryId?: string; + categoryName?: string; +} + +export interface AnnouncementListDto extends EntityDto { + title?: string; + briefContent?: string; + categoryId?: string; + categoryName?: string; +} diff --git a/angular-web/src/app/proxy/controllers/examination.service.ts b/angular-web/src/app/proxy/controllers/examination.service.ts index ffb8e62b..3dcc5131 100644 --- a/angular-web/src/app/proxy/controllers/examination.service.ts +++ b/angular-web/src/app/proxy/controllers/examination.service.ts @@ -1,12 +1,7 @@ import { RestService, Rest } from '@abp/ng.core'; import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; import { Injectable, inject } from '@angular/core'; -import type { - ExamDetailDto, - ExamListDto, - ExamRankingDto, - GetExamsInput, -} from '../exam-management/exams/models'; +import type { ExamDetailDto, ExamListDto, ExamRankingDto, GetExamsInput } from '../exam-management/exams/models'; @Injectable({ providedIn: 'root', @@ -14,38 +9,29 @@ import type { export class ExaminationService { private restService = inject(RestService); apiName = 'Default'; + get = (id: string, config?: Partial) => - this.restService.request( - { - method: 'GET', - url: `/api/exams/${id}`, - }, - { apiName: this.apiName, ...config }, - ); + this.restService.request({ + method: 'GET', + url: `/api/exams/${id}`, + }, + { apiName: this.apiName,...config }); + getList = (input: GetExamsInput, config?: Partial) => - this.restService.request>( - { - method: 'GET', - url: '/api/exams', - params: { - status: input.status, - name: input.name, - sorting: input.sorting, - skipCount: input.skipCount, - maxResultCount: input.maxResultCount, - }, - }, - { apiName: this.apiName, ...config }, - ); + this.restService.request>({ + method: 'GET', + url: '/api/exams', + params: { name: input.name, status: input.status, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName,...config }); + getRankingList = (id: string, config?: Partial) => - this.restService.request>( - { - method: 'GET', - url: `/api/exams/${id}/ranking`, - }, - { apiName: this.apiName, ...config }, - ); -} + this.restService.request>({ + method: 'GET', + url: `/api/exams/${id}/ranking`, + }, + { apiName: this.apiName,...config }); +} \ No newline at end of file diff --git a/angular-web/src/app/proxy/exam-management/exams/models.ts b/angular-web/src/app/proxy/exam-management/exams/models.ts index 12d5a646..62789621 100644 --- a/angular-web/src/app/proxy/exam-management/exams/models.ts +++ b/angular-web/src/app/proxy/exam-management/exams/models.ts @@ -7,7 +7,7 @@ export interface ExamDetailDto extends EntityDto { passingScore: number; totalTime: number; paperId?: string; - maxNumberOfTimesExceeded?: boolean; + maxNumberOfTimesExceeded: boolean; startTime?: string; endTime?: string; } diff --git a/angular-web/src/app/proxy/exam-management/user-exams/models.ts b/angular-web/src/app/proxy/exam-management/user-exams/models.ts index 82b40ab3..2016d9e9 100644 --- a/angular-web/src/app/proxy/exam-management/user-exams/models.ts +++ b/angular-web/src/app/proxy/exam-management/user-exams/models.ts @@ -20,6 +20,7 @@ export interface UserExamDetailDto extends EntityDto { examId?: string; examName: string; status: number; + isActive: boolean; endTime?: string; answerMode: number; sections: UserExamDetailDto_SectionDto[]; @@ -45,6 +46,8 @@ export interface UserExamDetailDto_SectionDto_QuestionDto { score?: number; questionScore?: number; knowledgePoints: string[]; + fixedOrder: boolean; + blankOptionsCount: number; options: UserExamDetailDto_SectionDto_QuestionDto_OptionDto[]; } @@ -63,4 +66,5 @@ export interface UserExamListDto extends EntityDto { creationTime?: string; isPassed?: boolean; status: number; + isActive: boolean; } diff --git a/angular-web/src/app/proxy/generate-proxy.json b/angular-web/src/app/proxy/generate-proxy.json index 60f09bcb..d36621e0 100644 --- a/angular-web/src/app/proxy/generate-proxy.json +++ b/angular-web/src/app/proxy/generate-proxy.json @@ -773,6 +773,132 @@ "rootPath": "app", "remoteServiceName": "Default", "controllers": { + "SuperAbp.Exam.Announcements.AnnouncementController": { + "controllerName": "Announcement", + "controllerGroupName": "Announcement", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Announcements.AnnouncementController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Announcements.IAnnouncementAppService", + "name": "IAnnouncementAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementDetailDto" + } + }, + { + "name": "GetEffectiveListAsync", + "parametersOnMethod": [ + { + "name": "categoryId", + "typeAsString": "System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": true, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/exam/announcements/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementDetailDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementDetailDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementAppService" + }, + "GetEffectiveListAsyncByCategoryId": { + "uniqueName": "GetEffectiveListAsyncByCategoryId", + "name": "GetEffectiveListAsync", + "httpMethod": "GET", + "url": "api/exam/announcements/effective", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "categoryId", + "typeAsString": "System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": true, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "categoryId", + "name": "categoryId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Query", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementAppService" + } + } + }, "SuperAbp.Exam.Controllers.ExaminationController": { "controllerName": "Examination", "controllerGroupName": "Examination", @@ -906,6 +1032,18 @@ "bindingSourceId": "ModelBinding", "descriptorName": "input" }, + { + "nameOnMethod": "input", + "name": "Status", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { "nameOnMethod": "input", "name": "Sorting", @@ -2718,6 +2856,107 @@ } } }, + "Exam": { + "rootPath": "Exam", + "remoteServiceName": "Exam", + "controllers": { + "SuperAbp.Exam.Announcements.AnnouncementCategoryController": { + "controllerName": "AnnouncementCategory", + "controllerGroupName": "AnnouncementCategory", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService", + "name": "IAnnouncementCategoryAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" + } + }, + { + "name": "GetListAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/exam/announcement-categories/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" + }, + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/exam/announcement-categories", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" + } + } + } + } + }, "featureManagement": { "rootPath": "featureManagement", "remoteServiceName": "AbpFeatureManagement", @@ -5471,6 +5710,189 @@ } }, "types": { + "SuperAbp.Exam.Announcements.AnnouncementCategoryDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Sort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Remark", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CreationTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.Exam.Announcements.AnnouncementDetailDto": { + "baseType": "Volo.Abp.Application.Dtos.EntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Title", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "Content", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CategoryId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CategoryName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, + "SuperAbp.Exam.Announcements.AnnouncementListDto": { + "baseType": "Volo.Abp.Application.Dtos.EntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Title", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "BriefContent", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CategoryId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "CategoryName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + } + ] + }, "SuperAbp.Exam.ExamManagement.Exams.ExamDetailDto": { "baseType": "Volo.Abp.Application.Dtos.EntityDto", "isEnum": false, @@ -5550,6 +5972,18 @@ "maximum": null, "regex": null }, + { + "name": "MaxNumberOfTimesExceeded", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, { "name": "StartTime", "jsonName": null, @@ -5780,6 +6214,18 @@ "minimum": null, "maximum": null, "regex": null + }, + { + "name": "Status", + "jsonName": null, + "type": "System.Int32?", + "typeSimple": "number?", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null } ] }, @@ -5937,6 +6383,18 @@ "maximum": null, "regex": null }, + { + "name": "IsActive", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, { "name": "EndTime", "jsonName": null, @@ -6183,6 +6641,30 @@ "maximum": null, "regex": null }, + { + "name": "FixedOrder", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, + { + "name": "BlankOptionsCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null + }, { "name": "Options", "jsonName": null, @@ -6344,6 +6826,18 @@ "minimum": null, "maximum": null, "regex": null + }, + { + "name": "IsActive", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false, + "minLength": null, + "maxLength": null, + "minimum": null, + "maximum": null, + "regex": null } ] }, diff --git a/angular-web/src/app/proxy/index.ts b/angular-web/src/app/proxy/index.ts index 67a62244..7707a399 100644 --- a/angular-web/src/app/proxy/index.ts +++ b/angular-web/src/app/proxy/index.ts @@ -1,7 +1,8 @@ +import * as Announcements from './announcements'; import * as Controllers from './controllers'; import * as ExamManagement from './exam-management'; import * as Favorites from './favorites'; import * as Mistakes from './mistakes'; import * as QuestionManagement from './question-management'; import * as TrainingManagement from './training-management'; -export { Controllers, ExamManagement, Favorites, Mistakes, QuestionManagement, TrainingManagement }; +export { Announcements, Controllers, ExamManagement, Favorites, Mistakes, QuestionManagement, TrainingManagement }; diff --git a/angular-web/src/app/route.provider.ts b/angular-web/src/app/route.provider.ts index 8e823a9d..994c3e88 100644 --- a/angular-web/src/app/route.provider.ts +++ b/angular-web/src/app/route.provider.ts @@ -37,10 +37,18 @@ function configureRoutes() { ]); routes.add([ { - name: '::Menu:My', + path: '/announcements', + name: '::Menu:Announcement', order: 4, layout: eLayoutType.application, }, + ]); + routes.add([ + { + name: '::Menu:My', + order: 5, + layout: eLayoutType.application, + }, { path: '/my/exams', name: '::Menu:MyExam', diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs index a0aee19b..dfdc5dc3 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateDto.cs @@ -1,22 +1,5 @@ -using System; - namespace SuperAbp.Exam.Admin.Announcements; -public class AnnouncementCreateOrUpdateDtoBase -{ - public string Title { get; set; } - - public string Content { get; set; } - - public DateTime? PublishTime { get; set; } - - public DateTime? ExpirationTime { get; set; } - - public int Sort { get; set; } - - public Guid? CategoryId { get; set; } -} - public class AnnouncementCreateDto : AnnouncementCreateOrUpdateDtoBase { } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs new file mode 100644 index 00000000..197a3ce7 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs @@ -0,0 +1,19 @@ +using System; + +namespace SuperAbp.Exam.Admin.Announcements; + +public class AnnouncementCreateOrUpdateDtoBase +{ + public bool Publish { get; set; } + public string Title { get; set; } + + public string Content { get; set; } + + public DateTime? PublishTime { get; set; } + + public DateTime? ExpirationTime { get; set; } + + public int Sort { get; set; } + + public Guid? CategoryId { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs index 1fe3f737..eec61dc0 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs @@ -64,6 +64,13 @@ public virtual async Task CreateAsync(AnnouncementCreateD { announcement.SetPublishTime(input.PublishTime.Value); } + else + { + if (input.Publish) + { + announcement.Publish(); + } + } await Repository.InsertAsync(announcement); return ObjectMapper.Map(announcement); @@ -91,6 +98,10 @@ public virtual async Task UpdateAsync(Guid id, Announceme } else { + if (input.Publish) + { + announcement.Publish(); + } announcement.PublishTime = null; } diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs similarity index 82% rename from aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs rename to aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs index 4877f647..d46d1f2a 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs @@ -4,9 +4,9 @@ namespace SuperAbp.Exam.Announcements; /// -/// 公告(用户端) +/// 公告详情(用户端) /// -public class AnnouncementDto : EntityDto +public class AnnouncementDetailDto : EntityDto { /// /// 标题 @@ -14,7 +14,7 @@ public class AnnouncementDto : EntityDto public string Title { get; set; } /// - /// 内容 + /// 完整内容 /// public string Content { get; set; } diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementListDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementListDto.cs new file mode 100644 index 00000000..ba71eb9f --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementListDto.cs @@ -0,0 +1,30 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace SuperAbp.Exam.Announcements; + +/// +/// 公告(用户端) +/// +public class AnnouncementListDto : EntityDto +{ + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 简短内容摘要 + /// + public string BriefContent { get; set; } + + /// + /// 分类ID + /// + public Guid? CategoryId { get; set; } + + /// + /// 分类名称 + /// + public string? CategoryName { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs index 3b044cb0..36a1f67f 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs @@ -14,10 +14,10 @@ public interface IAnnouncementAppService : IApplicationService /// /// 详情 /// - Task GetAsync(Guid id); + Task GetAsync(Guid id); /// /// 列表 /// - Task> GetEffectiveListAsync(Guid? categoryId = null); + Task> GetEffectiveListAsync(Guid? categoryId = null); } diff --git a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs index 1e4cd41b..80c8191a 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs @@ -17,7 +17,7 @@ public AnnouncementAppService(IAnnouncementRepository repository) _repository = repository; } - public virtual async Task GetAsync(Guid id) + public virtual async Task GetAsync(Guid id) { var announcement = await _repository.GetAsync(id); @@ -26,17 +26,17 @@ public virtual async Task GetAsync(Guid id) throw new BusinessException("Announcement not found or not effective"); } - return ObjectMapper.Map(announcement); + return ObjectMapper.Map(announcement); } - public virtual async Task> GetEffectiveListAsync(Guid? categoryId = null) + public virtual async Task> GetEffectiveListAsync(Guid? categoryId = null) { var items = categoryId.HasValue ? await _repository.GetEffectiveListByCategoryIdAsync(categoryId.Value, Clock.Now) : await _repository.GetEffectiveListAsync(Clock.Now); - var dtos = ObjectMapper.Map, List>(items); + var dtos = ObjectMapper.Map, List>(items); - return new ListResultDto(dtos); + return new ListResultDto(dtos); } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs b/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs index ff3044c5..1d2acf4e 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application/ExamApplicationAutoMapper.cs @@ -1,4 +1,5 @@ -using AutoMapper; +using System.Text.RegularExpressions; +using AutoMapper; using SuperAbp.Exam.Announcements; using SuperAbp.Exam.Favorites; using SuperAbp.Exam.Mistakes; @@ -10,7 +11,10 @@ public class ExamApplicationAutoMapper : Profile { public ExamApplicationAutoMapper() { - CreateMap() + CreateMap() + .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)) + .ForMember(dest => dest.BriefContent, opt => opt.MapFrom(src => GetBriefContent(src.Content))); + CreateMap() .ForMember(dest => dest.CategoryName, opt => opt.MapFrom(src => src.Category != null ? src.Category.Name : null)); CreateMap(); @@ -20,4 +24,26 @@ public ExamApplicationAutoMapper() CreateMap(); } + + private static string GetBriefContent(string htmlContent) + { + if (string.IsNullOrWhiteSpace(htmlContent)) + { + return string.Empty; + } + + var plainText = Regex.Replace(htmlContent, "<[^>]+>", string.Empty); + + plainText = System.Net.WebUtility.HtmlDecode(plainText); + + plainText = Regex.Replace(plainText, "\\s+", " ").Trim(); + + const int maxLength = 120; + if (plainText.Length <= maxLength) + { + return plainText; + } + + return plainText.Substring(0, maxLength) + "..."; + } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs index d09f8443..ba205c7a 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs @@ -97,6 +97,8 @@ public void SetPublishTime(DateTime publishTime) public void Unpublish() { IsPublished = false; + PublishTime = null; + ExpirationTime = null; } /// @@ -104,17 +106,19 @@ public void Unpublish() /// public bool IsEffective(DateTime now) { - if (!IsPublished || !PublishTime.HasValue) + if (!IsPublished) { return false; } - if (ExpirationTime.HasValue && now > ExpirationTime.Value) + // 如果设置了发布时间,需要检查是否已到发布时间 + if (PublishTime.HasValue && PublishTime.Value > now) { return false; } - if (PublishTime.Value > now) + // 检查是否已过期 + if (ExpirationTime.HasValue && now > ExpirationTime.Value) { return false; } diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs index b9fbe00a..6f07f860 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs @@ -25,11 +25,11 @@ public virtual async Task> GetEffectiveListAsync(DateTime now return await dbSet .Include(x => x.Category) .Where(x => x.IsPublished) - .Where(x => x.PublishTime.HasValue && x.PublishTime.Value <= now) + .Where(x => !x.PublishTime.HasValue || x.PublishTime.Value <= now) .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) .OrderBy(x => x.Sort) .ThenByDescending(x => x.CreationTime) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public virtual async Task> GetEffectiveListByCategoryIdAsync(Guid categoryId, DateTime now, CancellationToken cancellationToken = default) @@ -40,11 +40,11 @@ public virtual async Task> GetEffectiveListByCategoryIdAsync( .Include(x => x.Category) .Where(x => x.CategoryId == categoryId) .Where(x => x.IsPublished) - .Where(x => x.PublishTime.HasValue && x.PublishTime.Value <= now) + .Where(x => !x.PublishTime.HasValue || x.PublishTime.Value <= now) .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) .OrderBy(x => x.Sort) .ThenByDescending(x => x.CreationTime) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public virtual async Task GetCountAsync( diff --git a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs index 5b53454a..3a42da58 100644 --- a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs +++ b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs @@ -7,8 +7,6 @@ namespace SuperAbp.Exam.Announcements; -[RemoteService(Name = "Exam")] -[Area("Exam")] [Route("api/exam/announcements")] public class AnnouncementController : AbpController, IAnnouncementAppService { @@ -20,14 +18,14 @@ public AnnouncementController(IAnnouncementAppService announcementAppService) } [HttpGet("{id}")] - public Task GetAsync(Guid id) + public Task GetAsync(Guid id) { return _announcementAppService.GetAsync(id); } [HttpGet("effective")] - public Task> GetEffectiveListAsync([FromQuery] Guid? categoryId = null) + public Task> GetEffectiveListAsync([FromQuery] Guid? categoryId = null) { return _announcementAppService.GetEffectiveListAsync(categoryId); } -} +} \ No newline at end of file From a8224a805d7ace75f194b61e11726fb49b8e7865 Mon Sep 17 00:00:00 2001 From: snow Date: Mon, 9 Feb 2026 16:14:16 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../announcement-detail.component.scss | 0 .../announcement-detail/index.ts | 1 - .../announcements.component.html | 8 +- .../announcements/announcements.component.ts | 15 +- .../detail.component.html} | 21 +- .../detail.component.ts} | 27 +-- angular-web/src/app/announcements/index.ts | 1 - angular-web/src/app/announcements/routes.ts | 2 +- .../announcement-category.service.ts | 28 +++ .../announcements/announcement.service.ts | 6 +- .../src/app/proxy/announcements/index.ts | 1 + .../src/app/proxy/announcements/models.ts | 8 + angular-web/src/app/proxy/generate-proxy.json | 208 +++++++++--------- .../Announcements/IAnnouncementAppService.cs | 2 +- .../Announcements/AnnouncementAppService.cs | 2 +- .../Localization/Exam/zh-Hans.json | 3 +- .../AnnouncementCategoryController.cs | 6 +- .../Announcements/AnnouncementController.cs | 8 +- .../AnnouncementAppServiceTests.cs | 2 +- 19 files changed, 174 insertions(+), 175 deletions(-) delete mode 100644 angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss delete mode 100644 angular-web/src/app/announcements/announcement-detail/index.ts rename angular-web/src/app/announcements/{announcement-detail/announcement-detail.component.html => detail/detail.component.html} (68%) rename angular-web/src/app/announcements/{announcement-detail/announcement-detail.component.ts => detail/detail.component.ts} (61%) delete mode 100644 angular-web/src/app/announcements/index.ts create mode 100644 angular-web/src/app/proxy/announcements/announcement-category.service.ts diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss b/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/angular-web/src/app/announcements/announcement-detail/index.ts b/angular-web/src/app/announcements/announcement-detail/index.ts deleted file mode 100644 index 080e7cb7..00000000 --- a/angular-web/src/app/announcements/announcement-detail/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './announcement-detail.component'; diff --git a/angular-web/src/app/announcements/announcements.component.html b/angular-web/src/app/announcements/announcements.component.html index 0d9dc293..ab7e8cc2 100644 --- a/angular-web/src/app/announcements/announcements.component.html +++ b/angular-web/src/app/announcements/announcements.component.html @@ -5,12 +5,6 @@

{{ '::Announcements' | abpLocalization }}

- @if (error) { - - {{ error }} - - } - @if (loading) {
@@ -20,7 +14,7 @@

{{ '::Announcements' | abpLocalization }}

} @else if (announcements.length === 0) {
-

暂无公告

+

{{ '::NoData' | abpLocalization }}

} @else {
diff --git a/angular-web/src/app/announcements/announcements.component.ts b/angular-web/src/app/announcements/announcements.component.ts index 49d76721..bed17c8d 100644 --- a/angular-web/src/app/announcements/announcements.component.ts +++ b/angular-web/src/app/announcements/announcements.component.ts @@ -23,7 +23,6 @@ export class AnnouncementsComponent implements OnInit { announcements: AnnouncementListDto[] = []; loading = false; - error: string | null = null; ngOnInit() { this.loadAnnouncements(); @@ -31,20 +30,12 @@ export class AnnouncementsComponent implements OnInit { loadAnnouncements() { this.loading = true; - this.error = null; this.announcementService - .getEffectiveList() - .subscribe({ - next: (result: ListResultDto) => { + .getList() + .subscribe((result: ListResultDto) => { this.announcements = result.items || []; this.loading = false; - }, - error: (err) => { - console.error('加载公告失败', err); - this.error = '加载公告失败,请稍后重试'; - this.loading = false; - } - }); + }); } } diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html b/angular-web/src/app/announcements/detail/detail.component.html similarity index 68% rename from angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html rename to angular-web/src/app/announcements/detail/detail.component.html index d9ee8a06..c4e847f4 100644 --- a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.html +++ b/angular-web/src/app/announcements/detail/detail.component.html @@ -1,11 +1,6 @@
- - @if (error) { {{ error }} @@ -15,13 +10,19 @@ @if (loading) {
- 加载中... + {{ '::Loading' | abpLocalization }}
} @else if (announcement) {
+
+ + + {{'::Back' | abpLocalization }} + +
-
+

{{ announcement.title }}

@if (announcement.categoryName) { {{ announcement.categoryName }} @@ -30,12 +31,6 @@

{{ announcement.title }}


-
}
diff --git a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts b/angular-web/src/app/announcements/detail/detail.component.ts similarity index 61% rename from angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts rename to angular-web/src/app/announcements/detail/detail.component.ts index 13cc138e..056a0f70 100644 --- a/angular-web/src/app/announcements/announcement-detail/announcement-detail.component.ts +++ b/angular-web/src/app/announcements/detail/detail.component.ts @@ -4,12 +4,12 @@ import { ActivatedRoute, Router } from '@angular/router'; import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'; import { AnnouncementService } from '@proxy/announcements'; import { AnnouncementDetailDto } from '@proxy/announcements'; +import { CoreModule } from '@abp/ng.core'; @Component({ - selector: 'app-announcement-detail', - templateUrl: './announcement-detail.component.html', - styleUrls: ['./announcement-detail.component.scss'], - imports: [CommonModule, NgbAlertModule], + selector: 'app-announcements-detail', + templateUrl: './detail.component.html', + imports: [CoreModule, CommonModule, NgbAlertModule], standalone: true, }) export class AnnouncementDetailComponent implements OnInit { @@ -26,7 +26,7 @@ export class AnnouncementDetailComponent implements OnInit { if (id) { this.loadAnnouncement(id); } else { - this.error = '公告ID不存在'; + this.goBack(); } } @@ -34,19 +34,10 @@ export class AnnouncementDetailComponent implements OnInit { this.loading = true; this.error = null; - this.announcementService - .get(id) - .subscribe({ - next: (result: AnnouncementDetailDto) => { - this.announcement = result; - this.loading = false; - }, - error: (err) => { - console.error('加载公告失败', err); - this.error = '公告不存在或已被删除'; - this.loading = false; - } - }); + this.announcementService.get(id).subscribe((result: AnnouncementDetailDto) => { + this.announcement = result; + this.loading = false; + }); } goBack() { diff --git a/angular-web/src/app/announcements/index.ts b/angular-web/src/app/announcements/index.ts deleted file mode 100644 index 756b9e62..00000000 --- a/angular-web/src/app/announcements/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './announcements.component'; diff --git a/angular-web/src/app/announcements/routes.ts b/angular-web/src/app/announcements/routes.ts index e5006b4b..cc903e39 100644 --- a/angular-web/src/app/announcements/routes.ts +++ b/angular-web/src/app/announcements/routes.ts @@ -1,7 +1,7 @@ import { Routes } from '@angular/router'; import { authGuard } from '@abp/ng.core'; import { AnnouncementsComponent } from './announcements.component'; -import { AnnouncementDetailComponent } from './announcement-detail'; +import { AnnouncementDetailComponent } from './detail/detail.component'; export const routes: Routes = [ { diff --git a/angular-web/src/app/proxy/announcements/announcement-category.service.ts b/angular-web/src/app/proxy/announcements/announcement-category.service.ts new file mode 100644 index 00000000..1c4c8698 --- /dev/null +++ b/angular-web/src/app/proxy/announcements/announcement-category.service.ts @@ -0,0 +1,28 @@ +import type { AnnouncementCategoryDto } from './models'; +import { RestService, Rest } from '@abp/ng.core'; +import type { ListResultDto } from '@abp/ng.core'; +import { Injectable, inject } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class AnnouncementCategoryService { + private restService = inject(RestService); + apiName = 'Default'; + + + get = (id: string, config?: Partial) => + this.restService.request({ + method: 'GET', + url: `/api/announcement-categories/${id}`, + }, + { apiName: this.apiName,...config }); + + + getList = (config?: Partial) => + this.restService.request>({ + method: 'GET', + url: '/api/announcement-categories', + }, + { apiName: this.apiName,...config }); +} \ No newline at end of file diff --git a/angular-web/src/app/proxy/announcements/announcement.service.ts b/angular-web/src/app/proxy/announcements/announcement.service.ts index 23caa3ef..4df5613a 100644 --- a/angular-web/src/app/proxy/announcements/announcement.service.ts +++ b/angular-web/src/app/proxy/announcements/announcement.service.ts @@ -14,15 +14,15 @@ export class AnnouncementService { get = (id: string, config?: Partial) => this.restService.request({ method: 'GET', - url: `/api/exam/announcements/${id}`, + url: `/api/announcements/${id}`, }, { apiName: this.apiName,...config }); - getEffectiveList = (categoryId?: string, config?: Partial) => + getList = (categoryId?: string, config?: Partial) => this.restService.request>({ method: 'GET', - url: '/api/exam/announcements/effective', + url: '/api/announcements', params: { categoryId }, }, { apiName: this.apiName,...config }); diff --git a/angular-web/src/app/proxy/announcements/index.ts b/angular-web/src/app/proxy/announcements/index.ts index 447b4d46..6d5bbff6 100644 --- a/angular-web/src/app/proxy/announcements/index.ts +++ b/angular-web/src/app/proxy/announcements/index.ts @@ -1,2 +1,3 @@ +export * from './announcement-category.service'; export * from './announcement.service'; export * from './models'; diff --git a/angular-web/src/app/proxy/announcements/models.ts b/angular-web/src/app/proxy/announcements/models.ts index 2d1e9044..91bf67ed 100644 --- a/angular-web/src/app/proxy/announcements/models.ts +++ b/angular-web/src/app/proxy/announcements/models.ts @@ -1,5 +1,13 @@ import type { EntityDto } from '@abp/ng.core'; +export interface AnnouncementCategoryDto { + id?: string; + name?: string; + sort: number; + remark?: string; + creationTime?: string; +} + export interface AnnouncementDetailDto extends EntityDto { title?: string; content?: string; diff --git a/angular-web/src/app/proxy/generate-proxy.json b/angular-web/src/app/proxy/generate-proxy.json index d36621e0..f6cf3c5d 100644 --- a/angular-web/src/app/proxy/generate-proxy.json +++ b/angular-web/src/app/proxy/generate-proxy.json @@ -773,6 +773,101 @@ "rootPath": "app", "remoteServiceName": "Default", "controllers": { + "SuperAbp.Exam.Announcements.AnnouncementCategoryController": { + "controllerName": "AnnouncementCategory", + "controllerGroupName": "AnnouncementCategory", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryController", + "interfaces": [ + { + "type": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService", + "name": "IAnnouncementCategoryAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" + } + }, + { + "name": "GetListAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/announcement-categories/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", + "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" + }, + "GetListAsync": { + "uniqueName": "GetListAsync", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/announcement-categories", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" + } + } + }, "SuperAbp.Exam.Announcements.AnnouncementController": { "controllerName": "Announcement", "controllerGroupName": "Announcement", @@ -803,7 +898,7 @@ } }, { - "name": "GetEffectiveListAsync", + "name": "GetListAsync", "parametersOnMethod": [ { "name": "categoryId", @@ -827,7 +922,7 @@ "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/exam/announcements/{id}", + "url": "api/announcements/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -860,11 +955,11 @@ "allowAnonymous": null, "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementAppService" }, - "GetEffectiveListAsyncByCategoryId": { - "uniqueName": "GetEffectiveListAsyncByCategoryId", - "name": "GetEffectiveListAsync", + "GetListAsyncByCategoryId": { + "uniqueName": "GetListAsyncByCategoryId", + "name": "GetListAsync", "httpMethod": "GET", - "url": "api/exam/announcements/effective", + "url": "api/announcements", "supportedVersions": [], "parametersOnMethod": [ { @@ -2856,107 +2951,6 @@ } } }, - "Exam": { - "rootPath": "Exam", - "remoteServiceName": "Exam", - "controllers": { - "SuperAbp.Exam.Announcements.AnnouncementCategoryController": { - "controllerName": "AnnouncementCategory", - "controllerGroupName": "AnnouncementCategory", - "isRemoteService": true, - "isIntegrationService": false, - "apiVersion": null, - "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryController", - "interfaces": [ - { - "type": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService", - "name": "IAnnouncementCategoryAppService", - "methods": [ - { - "name": "GetAsync", - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", - "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" - } - }, - { - "name": "GetListAsync", - "parametersOnMethod": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - } - ] - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/exam/announcement-categories/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto", - "typeSimple": "SuperAbp.Exam.Announcements.AnnouncementCategoryDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" - }, - "GetListAsync": { - "uniqueName": "GetListAsync", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/exam/announcement-categories", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null, - "implementFrom": "SuperAbp.Exam.Announcements.IAnnouncementCategoryAppService" - } - } - } - } - }, "featureManagement": { "rootPath": "featureManagement", "remoteServiceName": "AbpFeatureManagement", diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs index 36a1f67f..87d112c7 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/IAnnouncementAppService.cs @@ -19,5 +19,5 @@ public interface IAnnouncementAppService : IApplicationService /// /// 列表 /// - Task> GetEffectiveListAsync(Guid? categoryId = null); + Task> GetListAsync(Guid? categoryId = null); } diff --git a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs index 80c8191a..659ab302 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application/Announcements/AnnouncementAppService.cs @@ -29,7 +29,7 @@ public virtual async Task GetAsync(Guid id) return ObjectMapper.Map(announcement); } - public virtual async Task> GetEffectiveListAsync(Guid? categoryId = null) + public virtual async Task> GetListAsync(Guid? categoryId = null) { var items = categoryId.HasValue ? await _repository.GetEffectiveListByCategoryIdAsync(categoryId.Value, Clock.Now) diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json index 60adad5d..eb826cef 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json @@ -34,6 +34,7 @@ "OnlineExam": "在线考试", "Detail": "详情", "Title": "标题", + "NoData": "无数据", "Remark": "备注", "Passed": "通过", "RequiredAnswerCount": "必填答案数", @@ -217,4 +218,4 @@ "Exam:Exams:0003": "存在未完成评分的考试", "Exam:Announcement:0001": "已发布的公告不能修改" } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs index 24462411..d3e777a8 100644 --- a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs +++ b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementCategoryController.cs @@ -7,9 +7,7 @@ namespace SuperAbp.Exam.Announcements; -[RemoteService(Name = "Exam")] -[Area("Exam")] -[Route("api/exam/announcement-categories")] +[Route("api/announcement-categories")] public class AnnouncementCategoryController : AbpController, IAnnouncementCategoryAppService { private readonly IAnnouncementCategoryAppService _categoryAppService; @@ -30,4 +28,4 @@ public Task> GetListAsync() { return _categoryAppService.GetListAsync(); } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs index 3a42da58..7df633fa 100644 --- a/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs +++ b/aspnet-core/src/SuperAbp.Exam.HttpApi/Announcements/AnnouncementController.cs @@ -7,7 +7,7 @@ namespace SuperAbp.Exam.Announcements; -[Route("api/exam/announcements")] +[Route("api/announcements")] public class AnnouncementController : AbpController, IAnnouncementAppService { private readonly IAnnouncementAppService _announcementAppService; @@ -23,9 +23,9 @@ public Task GetAsync(Guid id) return _announcementAppService.GetAsync(id); } - [HttpGet("effective")] - public Task> GetEffectiveListAsync([FromQuery] Guid? categoryId = null) + [HttpGet] + public Task> GetListAsync([FromQuery] Guid? categoryId = null) { - return _announcementAppService.GetEffectiveListAsync(categoryId); + return _announcementAppService.GetListAsync(categoryId); } } \ No newline at end of file diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs index 343f11e6..029d4103 100644 --- a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAppServiceTests.cs @@ -24,7 +24,7 @@ protected AnnouncementAppServiceTests() [Fact] public async Task Should_Get_Effective_List() { - var result = await _appService.GetEffectiveListAsync(_testData.AnnouncementCategory1Id); + var result = await _appService.GetListAsync(_testData.AnnouncementCategory1Id); result.Items.ShouldNotBeNull(); result.Items.Count.ShouldBeGreaterThan(0); } From 89fa36d4541901424e514861e32108d34d75ff4a Mon Sep 17 00:00:00 2001 From: snow Date: Tue, 10 Feb 2026 13:47:47 +0800 Subject: [PATCH 5/6] format --- .github/agents/CSharpExpert.agent.md | 204 + .../app/proxy/admin/announcements/models.ts | 24 +- .../announcement/announcement.component.ts | 310 +- .../sys/announcement/edit/edit.component.html | 16 +- .../sys/announcement/edit/edit.component.ts | 388 +- .../detail/detail.component.html | 6 + .../src/app/proxy/announcements/models.ts | 4 +- .../AnnouncementCreateOrUpdateDtoBase.cs | 4 +- ...ouncementCreateOrUpdateDtoBaseValidator.cs | 16 +- .../Announcements/AnnouncementDetailDto.cs | 8 +- .../Announcements/AnnouncementListDto.cs | 8 +- .../AnnouncementAdminAppService.cs | 14 +- .../Announcements/AnnouncementDetailDto.cs | 4 +- .../AnnouncementAutoPublishWorker.cs | 4 +- .../Announcements/AnnouncementConsts.cs | 2 +- .../Localization/Exam/en.json | 4 +- .../Localization/Exam/zh-Hans.json | 6 +- .../Announcements/Announcement.cs | 18 +- .../Announcements/AnnouncementRepository.cs | 12 +- ...0209000000_RenameAnnouncementTimeFields.cs | 38 + ...4_RenameAnnouncementTimeFields.Designer.cs | 3348 +++++++++++++++++ ...0210052804_RenameAnnouncementTimeFields.cs | 38 + .../Migrations/ExamDbContextModelSnapshot.cs | 8 +- .../AnnouncementAdminAppServiceTests.cs | 5 +- .../ExamTestDataBuilder.cs | 6 +- 25 files changed, 4063 insertions(+), 432 deletions(-) create mode 100644 .github/agents/CSharpExpert.agent.md create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.Designer.cs create mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.cs diff --git a/.github/agents/CSharpExpert.agent.md b/.github/agents/CSharpExpert.agent.md new file mode 100644 index 00000000..170d8f34 --- /dev/null +++ b/.github/agents/CSharpExpert.agent.md @@ -0,0 +1,204 @@ +--- +name: "C# Expert" +description: An agent designed to assist with software development tasks for .NET projects. +# version: 2026-01-20a +--- + +You are an expert C#/.NET developer. You help with .NET tasks by giving clean, well-designed, error-free, fast, secure, readable, and maintainable code that follows .NET conventions. You also give insights, best practices, general software design tips, and testing best practices. + +You are familiar with the currently released .NET and C# versions (for example, up to .NET 10 and C# 14 at the time of writing). (Refer to https://learn.microsoft.com/en-us/dotnet/core/whats-new +and https://learn.microsoft.com/en-us/dotnet/csharp/whats-new for details.) + +When invoked: + +- Understand the user's .NET task and context +- Propose clean, organized solutions that follow .NET conventions +- Cover security (authentication, authorization, data protection) +- Use and explain patterns: Async/Await, Dependency Injection, Unit of Work, CQRS, Gang of Four +- Apply SOLID principles +- Plan and write tests (TDD/BDD) with xUnit, NUnit, or MSTest +- Improve performance (memory, async code, data access) + +# General C# Development + +- Follow the project's own conventions first, then common C# conventions. +- Keep naming, formatting, and project structure consistent. + +## Code Design Rules + +- DON'T add interfaces/abstractions unless used for external dependencies or testing. +- Don't wrap existing abstractions. +- Don't default to `public`. Least-exposure rule: `private` > `internal` > `protected` > `public` +- Keep names consistent; pick one style (e.g., `WithHostPort` or `WithBrowserPort`) and stick to it. +- Don't edit auto-generated code (`/api/*.cs`, `*.g.cs`, `// `). +- Comments explain **why**, not what. +- Don't add unused methods/params. +- When fixing one method, check siblings for the same issue. +- Reuse existing methods as much as possible +- Add comments when adding public methods +- Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable. + +## Error Handling & Edge Cases + +- **Null checks**: use `ArgumentNullException.ThrowIfNull(x)`; for strings use `string.IsNullOrWhiteSpace(x)`; guard early. Avoid blanket `!`. +- **Exceptions**: choose precise types (e.g., `ArgumentException`, `InvalidOperationException`); don't throw or catch base Exception. +- **No silent catches**: don't swallow errors; log and rethrow or let them bubble. + +## Goals for .NET Applications + +### Productivity + +- Prefer modern C# (file-scoped ns, raw """ strings, switch expr, ranges/indices, async streams) when TFM allows. +- Keep diffs small; reuse code; avoid new layers unless needed. +- Be IDE-friendly (go-to-def, rename, quick fixes work). + +### Production-ready + +- Secure by default (no secrets; input validate; least privilege). +- Resilient I/O (timeouts; retry with backoff when it fits). +- Structured logging with scopes; useful context; no log spam. +- Use precise exceptions; don’t swallow; keep cause/context. + +### Performance + +- Simple first; optimize hot paths when measured. +- Stream large payloads; avoid extra allocs. +- Use Span/Memory/pooling when it matters. +- Async end-to-end; no sync-over-async. + +### Cloud-native / cloud-ready + +- Cross-platform; guard OS-specific APIs. +- Diagnostics: health/ready when it fits; metrics + traces. +- Observability: ILogger + OpenTelemetry hooks. +- 12-factor: config from env; avoid stateful singletons. + +# .NET quick checklist + +## Do first + +- Read TFM + C# version. +- Check `global.json` SDK. + +## Initial check + +- App type: web / desktop / console / lib. +- Packages (and multi-targeting). +- Nullable on? (`enable` / `#nullable enable`) +- Repo config: `Directory.Build.*`, `Directory.Packages.props`. + +## C# version + +- **Don't** set C# newer than TFM default. +- C# 14 (NET 10+): extension members; `field` accessor; implicit `Span` conv; `?.=`; `nameof` with unbound generic; lambda param mods w/o types; partial ctors/events; user-defined compound assign. + +## Build + +- .NET 5+: `dotnet build`, `dotnet publish`. +- .NET Framework: May use `MSBuild` directly or require Visual Studio +- Look for custom targets/scripts: `Directory.Build.targets`, `build.cmd/.sh`, `Build.ps1`. + +## Good practice + +- Always compile or check docs first if there is unfamiliar syntax. Don't try to correct the syntax if code can compile. +- Don't change TFM, SDK, or `` unless asked. + +# Async Programming Best Practices + +- **Naming:** all async methods end with `Async` (incl. CLI handlers). +- **Always await:** no fire-and-forget; if timing out, **cancel the work**. +- **Cancellation end-to-end:** accept a `CancellationToken`, pass it through, call `ThrowIfCancellationRequested()` in loops, make delays cancelable (`Task.Delay(ms, ct)`). +- **Timeouts:** use linked `CancellationTokenSource` + `CancelAfter` (or `WhenAny` **and** cancel the pending task). +- **Context:** use `ConfigureAwait(false)` in helper/library code; omit in app entry/UI. +- **Stream JSON:** `GetAsync(..., ResponseHeadersRead)` → `ReadAsStreamAsync` → `JsonDocument.ParseAsync`; avoid `ReadAsStringAsync` when large. +- **Exit code on cancel:** return non-zero (e.g., `130`). +- **`ValueTask`:** use only when measured to help; default to `Task`. +- **Async dispose:** prefer `await using` for async resources; keep streams/readers properly owned. +- **No pointless wrappers:** don’t add `async/await` if you just return the task. + +## Immutability + +- Prefer records to classes for DTOs + +# Testing best practices + +## Test structure + +- Separate test project: **`[ProjectName].Tests`**. +- Mirror classes: `CatDoor` -> `CatDoorTests`. +- Name tests by behavior: `WhenCatMeowsThenCatDoorOpens`. +- Follow existing naming conventions. +- Use **public instance** classes; avoid **static** fields. +- No branching/conditionals inside tests. + +## Unit Tests + +- One behavior per test; +- Avoid Unicode symbols. +- Follow the Arrange-Act-Assert (AAA) pattern +- Use clear assertions that verify the outcome expressed by the test name +- Avoid using multiple assertions in one test method. In this case, prefer multiple tests. +- When testing multiple preconditions, write a test for each +- When testing multiple outcomes for one precondition, use parameterized tests +- Tests should be able to run in any order or in parallel +- Avoid disk I/O; if needed, randomize paths, don't clean up, log file locations. +- Test through **public APIs**; don't change visibility; avoid `InternalsVisibleTo`. +- Require tests for new/changed **public APIs**. +- Assert specific values and edge cases, not vague outcomes. + +## Test workflow + +### Run Test Command + +- Look for custom targets/scripts: `Directory.Build.targets`, `test.ps1/.cmd/.sh` +- .NET Framework: May use `vstest.console.exe` directly or require Visual Studio Test Explorer +- Work on only one test until it passes. Then run other tests to ensure nothing has been broken. + +### Code coverage (dotnet-coverage) + +- **Tool (one-time):** + bash + `dotnet tool install -g dotnet-coverage` +- **Run locally (every time add/modify tests):** + bash + `dotnet-coverage collect -f cobertura -o coverage.cobertura.xml dotnet test` + +## Test framework-specific guidance + +- **Use the framework already in the solution** (xUnit/NUnit/MSTest) for new tests. + +### xUnit + +- Packages: `Microsoft.NET.Test.Sdk`, `xunit`, `xunit.runner.visualstudio` +- No class attribute; use `[Fact]` +- Parameterized tests: `[Theory]` with `[InlineData]` +- Setup/teardown: constructor and `IDisposable` + +### xUnit v3 + +- Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk` +- `ITestOutputHelper` and `[Theory]` are in `Xunit` + +### NUnit + +- Packages: `Microsoft.NET.Test.Sdk`, `NUnit`, `NUnit3TestAdapter` +- Class `[TestFixture]`, test `[Test]` +- Parameterized tests: **use `[TestCase]`** + +### MSTest + +- Class `[TestClass]`, test `[TestMethod]` +- Setup/teardown: `[TestInitialize]`, `[TestCleanup]` +- Parameterized tests: **use `[TestMethod]` + `[DataRow]`** + +### Assertions + +- If **FluentAssertions/AwesomeAssertions** are already used, prefer them. +- Otherwise, use the framework’s asserts. +- Use `Throws/ThrowsAsync` (or MSTest `Assert.ThrowsException`) for exceptions. + +## Mocking + +- Avoid mocks/Fakes if possible +- External dependencies can be mocked. Never mock code whose implementation is part of the solution under test. +- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later. diff --git a/angular-admin/src/app/proxy/admin/announcements/models.ts b/angular-admin/src/app/proxy/admin/announcements/models.ts index dd2bcddb..37c4dd7c 100644 --- a/angular-admin/src/app/proxy/admin/announcements/models.ts +++ b/angular-admin/src/app/proxy/admin/announcements/models.ts @@ -1,7 +1,6 @@ import type { FullAuditedEntityDto, PagedAndSortedResultRequestDto } from '@abp/ng.core'; -export interface AnnouncementCategoryCreateDto extends AnnouncementCategoryCreateOrUpdateDtoBase { -} +export interface AnnouncementCategoryCreateDto extends AnnouncementCategoryCreateOrUpdateDtoBase {} export interface AnnouncementCategoryCreateOrUpdateDtoBase { name?: string; @@ -21,17 +20,15 @@ export interface AnnouncementCategoryListDto extends FullAuditedEntityDto { title?: string; content?: string; - publishTime?: string; - expirationTime?: string; + scheduledPublishTime?: string; + scheduledExpirationTime?: string; isPublished: boolean; sort: number; categoryId?: string; @@ -50,16 +47,15 @@ export interface AnnouncementDetailDto extends FullAuditedEntityDto { export interface AnnouncementListDto extends FullAuditedEntityDto { title?: string; content?: string; - publishTime?: string; - expirationTime?: string; + scheduledPublishTime?: string; + scheduledExpirationTime?: string; isPublished: boolean; sort: number; categoryId?: string; categoryName?: string; } -export interface AnnouncementUpdateDto extends AnnouncementCreateOrUpdateDtoBase { -} +export interface AnnouncementUpdateDto extends AnnouncementCreateOrUpdateDtoBase {} export interface GetAnnouncementsInput extends PagedAndSortedResultRequestDto { title?: string; diff --git a/angular-admin/src/app/routes/sys/announcement/announcement.component.ts b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts index f8dc3e22..96b25600 100644 --- a/angular-admin/src/app/routes/sys/announcement/announcement.component.ts +++ b/angular-admin/src/app/routes/sys/announcement/announcement.component.ts @@ -15,180 +15,172 @@ import { tap } from 'rxjs/operators'; import { SysAnnouncementEditComponent } from './edit/edit.component'; @Component({ - selector: 'app-sys-announcement', - templateUrl: './announcement.component.html', - imports: [ - CoreModule, - PageHeaderModule, - DelonFormModule, - STModule, - NzCardModule, - NzButtonModule, - NzPopconfirmModule - ] + selector: 'app-sys-announcement', + templateUrl: './announcement.component.html', + imports: [CoreModule, PageHeaderModule, DelonFormModule, STModule, NzCardModule, NzButtonModule, NzPopconfirmModule] }) export class SysAnnouncementComponent implements OnInit { - private modal = inject(ModalHelper); - private localizationService = inject(LocalizationService); - private messageService = inject(NzMessageService); - private permissionService = inject(PermissionService); - private announcementService = inject(AnnouncementService); + private modal = inject(ModalHelper); + private localizationService = inject(LocalizationService); + private messageService = inject(NzMessageService); + private permissionService = inject(PermissionService); + private announcementService = inject(AnnouncementService); - announcements: any[]; - total: number; - loading = false; - params: GetAnnouncementsInput; - page: STPage = { - show: true, - showSize: true, - front: false, - pageSizes: [10, 20, 30, 40, 50] - }; - searchSchema: SFSchema = { - properties: { - title: { - type: 'string', - title: '', - ui: { - placeholder: this.localizationService.instant('Exam::Placeholder', this.localizationService.instant('Exam::Title')) - } - } + announcements: any[]; + total: number; + loading = false; + params: GetAnnouncementsInput; + page: STPage = { + show: true, + showSize: true, + front: false, + pageSizes: [10, 20, 30, 40, 50] + }; + searchSchema: SFSchema = { + properties: { + title: { + type: 'string', + title: '', + ui: { + placeholder: this.localizationService.instant('Exam::Placeholder', this.localizationService.instant('Exam::Title')) } - }; - @ViewChild('st', { static: false }) st: STComponent; - columns: STColumn[] = [ - { title: this.localizationService.instant('Exam::CategoryName'), index: 'categoryName' }, - { title: this.localizationService.instant('Exam::Title'), index: 'title' }, + } + } + }; + @ViewChild('st', { static: false }) st: STComponent; + columns: STColumn[] = [ + { title: this.localizationService.instant('Exam::CategoryName'), index: 'categoryName' }, + { title: this.localizationService.instant('Exam::Title'), index: 'title' }, + { + title: this.localizationService.instant('Exam::IsPublished'), + index: 'isPublished', + type: 'yn' + }, + { title: this.localizationService.instant('Exam::ScheduledPublishTime'), index: 'scheduledPublishTime', type: 'date' }, + { title: this.localizationService.instant('Exam::ScheduledExpirationTime'), index: 'scheduledExpirationTime', type: 'date' }, + { title: this.localizationService.instant('Exam::Sort'), index: 'sort' }, + + { + title: this.localizationService.instant('Exam::Actions'), + buttons: [ { - title: this.localizationService.instant('Exam::IsPublished'), - index: 'isPublished', - type: 'yn' + icon: 'edit', + type: 'modal', + iif: (record: any) => { + return this.permissionService.getGrantedPolicy('Exam.Announcements.Update'); + }, + modal: { + component: SysAnnouncementEditComponent, + params: (record: any) => ({ + announcementId: record.id + }) + }, + click: 'reload' }, - { title: this.localizationService.instant('Exam::PublishTime'), index: 'publishTime', type: 'date' }, - { title: this.localizationService.instant('Exam::ExpirationTime'), index: 'expirationTime', type: 'date' }, - { title: this.localizationService.instant('Exam::Sort'), index: 'sort' }, - { - title: this.localizationService.instant('Exam::Actions'), - buttons: [ - { - icon: 'edit', - type: 'modal', - iif: (record: any) => { - return this.permissionService.getGrantedPolicy('Exam.Announcements.Update'); - }, - modal: { - component: SysAnnouncementEditComponent, - params: (record: any) => ({ - announcementId: record.id - }) - }, - click: 'reload' - }, - { - icon: 'check', - text: this.localizationService.instant('Exam::Publish'), - iif: (record: any) => { - return !record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Publish'); - }, - pop: { - title: this.localizationService.instant('Exam::AreYouSure'), - okType: 'primary' - }, - click: (record: any) => { - this.announcementService.publish(record.id).subscribe(() => { - this.messageService.success(this.localizationService.instant('Exam::PublishedSuccessfully')); - this.st.reload(); - }); - } - }, - { - icon: 'close', - text: this.localizationService.instant('Exam::Unpublish'), - iif: (record: any) => { - return record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Unpublish'); - }, - pop: { - title: this.localizationService.instant('Exam::AreYouSure'), - okType: 'primary' - }, - click: (record: any) => { - this.announcementService.unpublish(record.id).subscribe(() => { - this.messageService.success(this.localizationService.instant('Exam::UnpublishedSuccessfully')); - this.st.reload(); - }); - } - }, - { - icon: 'delete', - type: 'del', - pop: { - title: this.localizationService.instant('Exam::AreYouSure'), - okType: 'danger', - icon: 'star' - }, - iif: () => { - return this.permissionService.getGrantedPolicy('Exam.Announcements.Delete'); - }, - click: (record: any, _modal, component) => { - this.announcementService.delete(record.id).subscribe(() => { - this.messageService.success(this.localizationService.instant('Exam::DeletedSuccessfully')); - // tslint:disable-next-line: no-non-null-assertion - component!.removeRow(record); - }); - } - } - ] + icon: 'check', + text: this.localizationService.instant('Exam::Publish'), + iif: (record: any) => { + return !record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Publish'); + }, + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'primary' + }, + click: (record: any) => { + this.announcementService.publish(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::PublishedSuccessfully')); + this.st.reload(); + }); + } + }, + { + icon: 'close', + text: this.localizationService.instant('Exam::Unpublish'), + iif: (record: any) => { + return record.isPublished && this.permissionService.getGrantedPolicy('Exam.Announcements.Unpublish'); + }, + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'primary' + }, + click: (record: any) => { + this.announcementService.unpublish(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::UnpublishedSuccessfully')); + this.st.reload(); + }); + } + }, + { + icon: 'delete', + type: 'del', + pop: { + title: this.localizationService.instant('Exam::AreYouSure'), + okType: 'danger', + icon: 'star' + }, + iif: () => { + return this.permissionService.getGrantedPolicy('Exam.Announcements.Delete'); + }, + click: (record: any, _modal, component) => { + this.announcementService.delete(record.id).subscribe(() => { + this.messageService.success(this.localizationService.instant('Exam::DeletedSuccessfully')); + // tslint:disable-next-line: no-non-null-assertion + component!.removeRow(record); + }); + } } - ]; - - ngOnInit() { - this.params = this.resetParameters(); - this.getList(); + ] } + ]; - getList() { - this.loading = true; - this.announcementService - .getList(this.params) - .pipe(tap(() => (this.loading = false))) - .subscribe(response => ((this.announcements = response.items), (this.total = response.totalCount))); - } + ngOnInit() { + this.params = this.resetParameters(); + this.getList(); + } - resetParameters(): GetAnnouncementsInput { - return { - skipCount: 0, - maxResultCount: 10, - sorting: 'Sort Asc' - }; - } + getList() { + this.loading = true; + this.announcementService + .getList(this.params) + .pipe(tap(() => (this.loading = false))) + .subscribe(response => ((this.announcements = response.items), (this.total = response.totalCount))); + } - change(e: STChange) { - if (e.type === 'pi' || e.type === 'ps') { - this.params.skipCount = (e.pi - 1) * e.ps; - this.params.maxResultCount = e.ps; - this.getList(); - } else if (e.type === 'sort') { - this.params.sorting = `${e.sort?.column?.index as string} ${e.sort.value === 'ascend' ? 'asc' : 'desc'}`; - this.getList(); - } - } + resetParameters(): GetAnnouncementsInput { + return { + skipCount: 0, + maxResultCount: 10, + sorting: 'Sort Asc' + }; + } - reset() { - this.params = this.resetParameters(); - this.st.load(1); + change(e: STChange) { + if (e.type === 'pi' || e.type === 'ps') { + this.params.skipCount = (e.pi - 1) * e.ps; + this.params.maxResultCount = e.ps; + this.getList(); + } else if (e.type === 'sort') { + this.params.sorting = `${e.sort?.column?.index as string} ${e.sort.value === 'ascend' ? 'asc' : 'desc'}`; + this.getList(); } + } - search(e) { - if (e.title) { - this.params.title = e.title; - } else { - delete this.params.title; - } - this.st.load(1); - } + reset() { + this.params = this.resetParameters(); + this.st.load(1); + } - add() { - this.modal.createStatic(SysAnnouncementEditComponent, { announcementId: '' }).subscribe(() => this.st.reload()); + search(e) { + if (e.title) { + this.params.title = e.title; + } else { + delete this.params.title; } + this.st.load(1); + } + + add() { + this.modal.createStatic(SysAnnouncementEditComponent, { announcementId: '' }).subscribe(() => this.st.reload()); + } } diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html index 3a7eedd1..2702f030 100644 --- a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.html @@ -47,20 +47,20 @@ - {{ 'Exam::PublishTime' | abpLocalization }} + {{ 'Exam::ScheduledPublishTime' | abpLocalization }} - - {{ 'Exam::ExpirationTime' | abpLocalization }} + {{ 'Exam::ScheduledExpirationTime' | abpLocalization }} - diff --git a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts index a3374705..b865f40e 100644 --- a/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts +++ b/angular-admin/src/app/routes/sys/announcement/edit/edit.component.ts @@ -18,210 +18,214 @@ import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; import { dateTimePickerUtil } from '@delon/util'; @Component({ - selector: 'app-sys-announcement-edit', - templateUrl: './edit.component.html', - providers: [{ provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' }], - imports: [ - CoreModule, - NzSpinModule, - NzModalModule, - NzFormModule, - NzInputModule, - NzInputNumberModule, - NzButtonModule, - NzDatePickerModule, - NzSelectModule, - EditorComponent - ] + selector: 'app-sys-announcement-edit', + templateUrl: './edit.component.html', + providers: [{ provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' }], + imports: [ + CoreModule, + NzSpinModule, + NzModalModule, + NzFormModule, + NzInputModule, + NzInputNumberModule, + NzButtonModule, + NzDatePickerModule, + NzSelectModule, + EditorComponent + ] }) export class SysAnnouncementEditComponent implements OnInit { - @Input() - announcementId: string; - - announcement: AnnouncementDetailDto; - categories: AnnouncementCategoryListDto[] = []; - loading = false; - isConfirmLoading = false; - - form: FormGroup = null; - init: EditorComponent['init'] = { - base_url: '/tinymce', - suffix: '.min', - plugins: 'preview fullscreen link table lists image media code', - toolbar: - 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | forecolor backcolor removeformat | link image media table | fullscreen preview code', - toolbar_mode: 'sliding', - height: 300, - menubar: false, - branding: false - }; - - private fb = inject(FormBuilder); - private modal = inject(NzModalRef); - private messageService = inject(NzMessageService); - private localizationService = inject(LocalizationService); - private announcementService = inject(AnnouncementService); - private categoryService = inject(AnnouncementCategoryService); - private i18n = inject(I18NService); - - constructor() { - if (this.i18n.defaultLang === 'zh-CN') { - this.init['language'] = 'zh_CN'; - this.init['language_url'] = '/assets/tinymce/langs/zh_CN.js'; - } - } - - get canPublish() :boolean { - return !this.form?.get('publishTime')?.value; + @Input() + announcementId: string; + + announcement: AnnouncementDetailDto; + categories: AnnouncementCategoryListDto[] = []; + loading = false; + isConfirmLoading = false; + + form: FormGroup = null; + init: EditorComponent['init'] = { + base_url: '/tinymce', + suffix: '.min', + plugins: 'preview fullscreen link table lists image media code', + toolbar: + 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | forecolor backcolor removeformat | link image media table | fullscreen preview code', + toolbar_mode: 'sliding', + height: 300, + menubar: false, + branding: false + }; + + private fb = inject(FormBuilder); + private modal = inject(NzModalRef); + private messageService = inject(NzMessageService); + private localizationService = inject(LocalizationService); + private announcementService = inject(AnnouncementService); + private categoryService = inject(AnnouncementCategoryService); + private i18n = inject(I18NService); + + constructor() { + if (this.i18n.defaultLang === 'zh-CN') { + this.init['language'] = 'zh_CN'; + this.init['language_url'] = '/assets/tinymce/langs/zh_CN.js'; } - - get canSave(): boolean { - return !this.announcement?.isPublished; - } - - ngOnInit(): void { - this.loading = true; - this.categoryService.getList().subscribe(response => { - this.categories = response.items; - }); - - if (this.announcementId) { - this.announcementService - .get(this.announcementId) - .pipe( - tap(response => { - this.announcement = response; - this.buildForm(); - this.loading = false; - }) - ) - .subscribe(); - } else { - this.announcement = { - title: '', - content: '', - publishTime: null, - expirationTime: null, - sort: 0, - categoryId: null, - isPublished: false, - displayOrder: 0 - } as AnnouncementDetailDto; + } + + get canPublish(): boolean { + return !this.form?.get('scheduledPublishTime')?.value; + } + + get canSave(): boolean { + return !this.announcement?.isPublished; + } + + ngOnInit(): void { + this.loading = true; + this.categoryService.getList().subscribe(response => { + this.categories = response.items; + }); + + if (this.announcementId) { + this.announcementService + .get(this.announcementId) + .pipe( + tap(response => { + this.announcement = response; this.buildForm(); this.loading = false; - } + }) + ) + .subscribe(); + } else { + this.announcement = { + title: '', + content: '', + scheduledPublishTime: null, + scheduledExpirationTime: null, + sort: 0, + categoryId: null, + isPublished: false, + displayOrder: 0 + } as AnnouncementDetailDto; + this.buildForm(); + this.loading = false; } - - buildForm() { - this.form = this.fb.group({ - title: [this.announcement?.title || '', [Validators.required]], - content: [this.announcement?.content || '', [Validators.required]], - publishTime: [this.announcement?.publishTime ? new Date(this.announcement.publishTime) : null], - expirationTime: [this.announcement?.expirationTime ? new Date(this.announcement.expirationTime) : null], - sort: [this.announcement?.sort ?? 0, [Validators.required, Validators.min(0)]], - categoryId: [this.announcement?.categoryId || null] - }); - - this.form.get('publishTime').valueChanges.subscribe(() => { - const expirationTimeControl = this.form.get('expirationTime'); - if (expirationTimeControl) { - expirationTimeControl.updateValueAndValidity(); - } - }); + } + + buildForm() { + this.form = this.fb.group({ + title: [this.announcement?.title || '', [Validators.required]], + content: [this.announcement?.content || '', [Validators.required]], + scheduledPublishTime: [this.announcement?.scheduledPublishTime ? new Date(this.announcement.scheduledPublishTime) : null], + scheduledExpirationTime: [this.announcement?.scheduledExpirationTime ? new Date(this.announcement.scheduledExpirationTime) : null], + sort: [this.announcement?.sort ?? 0, [Validators.required, Validators.min(0)]], + categoryId: [this.announcement?.categoryId || null] + }); + + this.form.get('scheduledPublishTime').valueChanges.subscribe(() => { + const scheduledExpirationTimeControl = this.form.get('scheduledExpirationTime'); + if (scheduledExpirationTimeControl) { + scheduledExpirationTimeControl.updateValueAndValidity(); + } + }); + } + + save(publish: boolean = false) { + if (!this.form.valid || this.isConfirmLoading) { + for (const key of Object.keys(this.form.controls)) { + this.form.controls[key].markAsDirty(); + this.form.controls[key].updateValueAndValidity(); + } + return; } - save(publish: boolean = false) { - if (!this.form.valid || this.isConfirmLoading) { - for (const key of Object.keys(this.form.controls)) { - this.form.controls[key].markAsDirty(); - this.form.controls[key].updateValueAndValidity(); - } - return; - } - - const publishTime = this.form.get('publishTime').value; - const expirationTime = this.form.get('expirationTime').value; - if(publishTime) { - publish = false; - } - - if (publishTime && expirationTime) { - const publishDate = new Date(publishTime); - const expireDate = new Date(expirationTime); - if (expireDate.getTime() <= publishDate.getTime()) { - this.messageService.warning(this.localizationService.instant('Exam::ExpirationTimeMustBeAfterPublishTime')); - return; - } - } - - this.isConfirmLoading = true; - - const formValue = this.form.value; - const data = { - ...formValue, - publish: publish, - expirationTime: formValue.expirationTime ? dateTimePickerUtil.format(formValue.expirationTime, 'yyyy-MM-dd HH:mm') + ':00' : null, - publishTime: formValue.publishTime ? dateTimePickerUtil.format(formValue.publishTime, 'yyyy-MM-dd HH:mm') + ':00' : null - }; - - if (this.announcementId) { - this.announcementService - .update(this.announcementId, data) - .pipe( - tap(() => { - this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); - this.modal.close(true); - }), - finalize(() => (this.isConfirmLoading = false)) - ) - .subscribe(); - } else { - this.announcementService - .create(data) - .pipe( - tap(() => { - this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); - this.modal.close(true); - }), - finalize(() => (this.isConfirmLoading = false)) - ) - .subscribe(); - } + const scheduledPublishTime = this.form.get('scheduledPublishTime').value; + const scheduledExpirationTime = this.form.get('scheduledExpirationTime').value; + if (scheduledPublishTime) { + publish = false; } - close() { - this.modal.destroy(); + if (scheduledPublishTime && scheduledExpirationTime) { + const publishDate = new Date(scheduledPublishTime); + const expireDate = new Date(scheduledExpirationTime); + if (expireDate.getTime() <= publishDate.getTime()) { + this.messageService.warning(this.localizationService.instant('Exam::ScheduledExpirationTimeMustBeAfterScheduledPublishTime')); + return; + } } - /** - * 禁用今天的日期之前的日期(发布时间只能选今天或未来) - */ - disabledDateBeforeToday = (current: Date): boolean => { - if (!current) { - return false; - } - const today = new Date(); - today.setHours(0, 0, 0, 0); - const currentDate = new Date(current); - currentDate.setHours(0, 0, 0, 0); - return currentDate.getTime() < today.getTime(); + this.isConfirmLoading = true; + + const formValue = this.form.value; + const data = { + ...formValue, + publish: publish, + scheduledExpirationTime: formValue.scheduledExpirationTime + ? dateTimePickerUtil.format(formValue.scheduledExpirationTime, 'yyyy-MM-dd HH:mm') + ':00' + : null, + scheduledPublishTime: formValue.scheduledPublishTime + ? dateTimePickerUtil.format(formValue.scheduledPublishTime, 'yyyy-MM-dd HH:mm') + ':00' + : null }; - /** - * 禁用早于发布时间的日期(过期时间不能早于发布时间) - */ - disabledDateBeforePublishTime = (current: Date): boolean => { - if (!current) { - return false; - } - const publishTime = this.form?.get('publishTime')?.value; - if (!publishTime) { - return this.disabledDateBeforeToday(current); - } - const publishDate = new Date(publishTime); - publishDate.setHours(0, 0, 0, 0); - const currentDate = new Date(current); - currentDate.setHours(0, 0, 0, 0); - return currentDate.getTime() < publishDate.getTime(); - }; + if (this.announcementId) { + this.announcementService + .update(this.announcementId, data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } else { + this.announcementService + .create(data) + .pipe( + tap(() => { + this.messageService.success(this.localizationService.instant('Exam::SaveSuccessfully')); + this.modal.close(true); + }), + finalize(() => (this.isConfirmLoading = false)) + ) + .subscribe(); + } + } + + close() { + this.modal.destroy(); + } + + /** + * 禁用今天的日期之前的日期(发布时间只能选今天或未来) + */ + disabledDateBeforeToday = (current: Date): boolean => { + if (!current) { + return false; + } + const today = new Date(); + today.setHours(0, 0, 0, 0); + const currentDate = new Date(current); + currentDate.setHours(0, 0, 0, 0); + return currentDate.getTime() < today.getTime(); + }; + + /** + * 禁用早于发布时间的日期(过期时间不能早于发布时间) + */ + disabledDateBeforePublishTime = (current: Date): boolean => { + if (!current) { + return false; + } + const publishTime = this.form?.get('publishTime')?.value; + if (!publishTime) { + return this.disabledDateBeforeToday(current); + } + const publishDate = new Date(publishTime); + publishDate.setHours(0, 0, 0, 0); + const currentDate = new Date(current); + currentDate.setHours(0, 0, 0, 0); + return currentDate.getTime() < publishDate.getTime(); + }; } diff --git a/angular-web/src/app/announcements/detail/detail.component.html b/angular-web/src/app/announcements/detail/detail.component.html index c4e847f4..f3be9581 100644 --- a/angular-web/src/app/announcements/detail/detail.component.html +++ b/angular-web/src/app/announcements/detail/detail.component.html @@ -30,6 +30,12 @@

{{ announcement.title }}


+
+ + + {{ '::CreationTime' | abpLocalization }}: {{ announcement.creationTime | date:'medium' }} + +
} diff --git a/angular-web/src/app/proxy/announcements/models.ts b/angular-web/src/app/proxy/announcements/models.ts index 91bf67ed..3bab46bc 100644 --- a/angular-web/src/app/proxy/announcements/models.ts +++ b/angular-web/src/app/proxy/announcements/models.ts @@ -1,4 +1,4 @@ -import type { EntityDto } from '@abp/ng.core'; +import type { CreationAuditedEntityDto, EntityDto } from '@abp/ng.core'; export interface AnnouncementCategoryDto { id?: string; @@ -8,7 +8,7 @@ export interface AnnouncementCategoryDto { creationTime?: string; } -export interface AnnouncementDetailDto extends EntityDto { +export interface AnnouncementDetailDto extends CreationAuditedEntityDto { title?: string; content?: string; categoryId?: string; diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs index 197a3ce7..a0ed1693 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBase.cs @@ -9,9 +9,9 @@ public class AnnouncementCreateOrUpdateDtoBase public string Content { get; set; } - public DateTime? PublishTime { get; set; } + public DateTime? ScheduledPublishTime { get; set; } - public DateTime? ExpirationTime { get; set; } + public DateTime? ScheduledExpirationTime { get; set; } public int Sort { get; set; } diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs index 0ef1b63d..36e4379d 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementCreateOrUpdateDtoBaseValidator.cs @@ -24,19 +24,19 @@ public AnnouncementCreateOrUpdateDtoBaseValidator(IStringLocalizer .MaximumLength(AnnouncementConsts.MaxContentLength) .WithMessage(local["The {0} field must be less than {1} characters.", "{PropertyName}", AnnouncementConsts.MaxContentLength]); - RuleFor(x => x.PublishTime) - .Must((dto, publishTime) => clock.ConvertToUtc(publishTime.Value) >= clock.Now) + RuleFor(x => x.ScheduledPublishTime) + .Must((dto, scheduledPublishTime) => clock.ConvertToUtc(scheduledPublishTime.Value) >= clock.Now) .WithMessage(local["Publish time must be in the future or now."]) - .When(x => x.PublishTime.HasValue); + .When(x => x.ScheduledPublishTime.HasValue); - RuleFor(x => x.ExpirationTime) - .Must((dto, expirationTime) => clock.ConvertToUtc(expirationTime.Value) > clock.Now) + RuleFor(x => x.ScheduledExpirationTime) + .Must((dto, scheduledExpirationTime) => clock.ConvertToUtc(scheduledExpirationTime.Value) > clock.Now) .WithMessage(local["Expiration time must be in the future."]) - .When(x => x.ExpirationTime.HasValue); + .When(x => x.ScheduledExpirationTime.HasValue); RuleFor(x => x) - .Must(dto => clock.ConvertToUtc(dto.PublishTime.Value) < clock.ConvertToUtc(dto.ExpirationTime.Value)) + .Must(dto => clock.ConvertToUtc(dto.ScheduledPublishTime.Value) < clock.ConvertToUtc(dto.ScheduledExpirationTime.Value)) .WithMessage(local["Expiration time must be after publish time."]) - .When(x => x.PublishTime.HasValue && x.ExpirationTime.HasValue); + .When(x => x.ScheduledPublishTime.HasValue && x.ScheduledExpirationTime.HasValue); } } \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs index acf9c46c..4f1baa87 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementDetailDto.cs @@ -19,14 +19,14 @@ public class AnnouncementDetailDto : FullAuditedEntityDto public string Content { get; set; } /// - /// 发布时间 + /// 预定发布时间 /// - public DateTime? PublishTime { get; set; } + public DateTime? ScheduledPublishTime { get; set; } /// - /// 过期时间 + /// 预定到期时间 /// - public DateTime? ExpirationTime { get; set; } + public DateTime? ScheduledExpirationTime { get; set; } /// /// 是否发布 diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs index 62c9b681..b7c0918c 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application.Contracts/Announcements/AnnouncementListDto.cs @@ -19,14 +19,14 @@ public class AnnouncementListDto : FullAuditedEntityDto public string Content { get; set; } /// - /// 发布时间 + /// 预定发布时间 /// - public DateTime? PublishTime { get; set; } + public DateTime? ScheduledPublishTime { get; set; } /// - /// 过期时间 + /// 预定到期时间 /// - public DateTime? ExpirationTime { get; set; } + public DateTime? ScheduledExpirationTime { get; set; } /// /// 是否发布 diff --git a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs index eec61dc0..5e65b1a7 100644 --- a/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs +++ b/aspnet-core/src/SuperAbp.Exam.Admin.Application/Announcements/AnnouncementAdminAppService.cs @@ -58,11 +58,11 @@ public virtual async Task CreateAsync(AnnouncementCreateD input.CategoryId ); - announcement.ExpirationTime = input.ExpirationTime; + announcement.ScheduledExpirationTime = input.ScheduledExpirationTime; - if (input.PublishTime.HasValue) + if (input.ScheduledPublishTime.HasValue) { - announcement.SetPublishTime(input.PublishTime.Value); + announcement.SetPublishTime(input.ScheduledPublishTime.Value); } else { @@ -90,11 +90,11 @@ public virtual async Task UpdateAsync(Guid id, Announceme announcement.Content = input.Content; announcement.Sort = input.Sort; announcement.CategoryId = input.CategoryId; - announcement.ExpirationTime = input.ExpirationTime; + announcement.ScheduledExpirationTime = input.ScheduledExpirationTime; - if (input.PublishTime.HasValue) + if (input.ScheduledPublishTime.HasValue) { - announcement.SetPublishTime(input.PublishTime.Value); + announcement.SetPublishTime(input.ScheduledPublishTime.Value); } else { @@ -102,7 +102,7 @@ public virtual async Task UpdateAsync(Guid id, Announceme { announcement.Publish(); } - announcement.PublishTime = null; + announcement.ScheduledPublishTime = null; } await Repository.UpdateAsync(announcement); diff --git a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs index d46d1f2a..d37fd54e 100644 --- a/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs +++ b/aspnet-core/src/SuperAbp.Exam.Application.Contracts/Announcements/AnnouncementDetailDto.cs @@ -6,7 +6,7 @@ namespace SuperAbp.Exam.Announcements; /// /// 公告详情(用户端) /// -public class AnnouncementDetailDto : EntityDto +public class AnnouncementDetailDto : CreationAuditedEntityDto { /// /// 标题 @@ -27,4 +27,4 @@ public class AnnouncementDetailDto : EntityDto /// 分类名称 /// public string? CategoryName { get; set; } -} +} \ No newline at end of file diff --git a/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs index 1a527957..f446d9ca 100644 --- a/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs +++ b/aspnet-core/src/SuperAbp.Exam.BackgroundServices/Announcements/AnnouncementAutoPublishWorker.cs @@ -88,7 +88,7 @@ private async Task PublishScheduledAnnouncementsAsync( var now = clock.Now; var toPublish = await queryable - .Where(a => !a.IsPublished && a.PublishTime.HasValue && a.PublishTime.Value <= now) + .Where(a => !a.IsPublished && a.ScheduledPublishTime.HasValue && a.ScheduledPublishTime.Value <= now) .ToListAsync(); if (toPublish.Any()) @@ -116,7 +116,7 @@ private async Task ExpireAnnouncementsAsync( var now = clock.Now; var toExpire = await queryable - .Where(a => a.IsPublished && a.ExpirationTime.HasValue && a.ExpirationTime.Value <= now) + .Where(a => a.IsPublished && a.ScheduledExpirationTime.HasValue && a.ScheduledExpirationTime.Value <= now) .ToListAsync(); if (toExpire.Any()) diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs index 44301364..97d1140f 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Announcements/AnnouncementConsts.cs @@ -2,7 +2,7 @@ public class AnnouncementConsts { - public const string DefaultSorting = "Sort ASC, CreationTime DESC"; + public const string DefaultSorting = "Sort DESC, CreationTime DESC"; public const int MaxTitleLength = 200; public const int MaxContentLength = 5000; diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json index a796402b..a953d67a 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/en.json @@ -13,7 +13,9 @@ "IsPublished": "Is Published", "PublishTime": "Publish Time", "ExpirationTime": "Expiration Time", - "ExpirationTimeMustBeAfterPublishTime": "Expiration time must be after publish time", + "ScheduledPublishTime": "Scheduled Publish Time", + "ScheduledExpirationTime": "Scheduled Expiration Time", + "ScheduledExpirationTimeMustBeAfterScheduledPublishTime": "Scheduled expiration time must be after scheduled publish time", "Sort": "Sort", "DisplayOrder": "Display Order", "CategoryName": "Category Name", diff --git a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json index eb826cef..b3676360 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json +++ b/aspnet-core/src/SuperAbp.Exam.Domain.Shared/Localization/Exam/zh-Hans.json @@ -143,8 +143,10 @@ "EditAnnouncement": "编辑公告", "IsPublished": "是否发布", "PublishTime": "发布时间", - "ExpirationTime": "过期时间", - "ExpirationTimeMustBeAfterPublishTime": "过期时间必须晚于发布时间", + "ExpirationTime": "到期时间", + "ScheduledPublishTime": "预定发布时间", + "ScheduledExpirationTime": "预定到期时间", + "ScheduledExpirationTimeMustBeAfterScheduledPublishTime": "预定到期时间必须晚于预定发布时间", "CategoryName": "分类名称", "Category": "分类", "PublishedSuccessfully": "发布成功", diff --git a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs index ba205c7a..319ade5f 100644 --- a/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs +++ b/aspnet-core/src/SuperAbp.Exam.Domain/Announcements/Announcement.cs @@ -37,14 +37,14 @@ public Announcement(Guid id, string title, string content, int sort = 0, Guid? c public string Content { get; set; } /// - /// 发布时间 + /// 预定发布时间 /// - public DateTime? PublishTime { get; set; } + public DateTime? ScheduledPublishTime { get; set; } /// - /// 过期时间 + /// 预定到期时间 /// - public DateTime? ExpirationTime { get; set; } + public DateTime? ScheduledExpirationTime { get; set; } /// /// 是否发布 @@ -88,7 +88,7 @@ public void SetPublishTime(DateTime publishTime) { return; } - PublishTime = publishTime; + ScheduledPublishTime = publishTime; } /// @@ -97,8 +97,8 @@ public void SetPublishTime(DateTime publishTime) public void Unpublish() { IsPublished = false; - PublishTime = null; - ExpirationTime = null; + ScheduledPublishTime = null; + ScheduledExpirationTime = null; } /// @@ -112,13 +112,13 @@ public bool IsEffective(DateTime now) } // 如果设置了发布时间,需要检查是否已到发布时间 - if (PublishTime.HasValue && PublishTime.Value > now) + if (ScheduledPublishTime.HasValue && ScheduledPublishTime.Value > now) { return false; } // 检查是否已过期 - if (ExpirationTime.HasValue && now > ExpirationTime.Value) + if (ScheduledExpirationTime.HasValue && now > ScheduledExpirationTime.Value) { return false; } diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs index 6f07f860..cd7d7c36 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/EntityFrameworkCore/Announcements/AnnouncementRepository.cs @@ -25,9 +25,9 @@ public virtual async Task> GetEffectiveListAsync(DateTime now return await dbSet .Include(x => x.Category) .Where(x => x.IsPublished) - .Where(x => !x.PublishTime.HasValue || x.PublishTime.Value <= now) - .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) - .OrderBy(x => x.Sort) + .Where(x => !x.ScheduledPublishTime.HasValue || x.ScheduledPublishTime.Value <= now) + .Where(x => !x.ScheduledExpirationTime.HasValue || x.ScheduledExpirationTime.Value > now) + .OrderByDescending(x => x.Sort) .ThenByDescending(x => x.CreationTime) .ToListAsync(cancellationToken); } @@ -40,9 +40,9 @@ public virtual async Task> GetEffectiveListByCategoryIdAsync( .Include(x => x.Category) .Where(x => x.CategoryId == categoryId) .Where(x => x.IsPublished) - .Where(x => !x.PublishTime.HasValue || x.PublishTime.Value <= now) - .Where(x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > now) - .OrderBy(x => x.Sort) + .Where(x => !x.ScheduledPublishTime.HasValue || x.ScheduledPublishTime.Value <= now) + .Where(x => !x.ScheduledExpirationTime.HasValue || x.ScheduledExpirationTime.Value > now) + .OrderByDescending(x => x.Sort) .ThenByDescending(x => x.CreationTime) .ToListAsync(cancellationToken); } diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs new file mode 100644 index 00000000..e9f9e900 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SuperAbp.Exam.Migrations +{ + /// + public partial class RenameAnnouncementTimeFields : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "PublishTime", + table: "AppAnnouncements", + newName: "ScheduledPublishTime"); + + migrationBuilder.RenameColumn( + name: "ExpirationTime", + table: "AppAnnouncements", + newName: "ScheduledExpirationTime"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "ScheduledPublishTime", + table: "AppAnnouncements", + newName: "PublishTime"); + + migrationBuilder.RenameColumn( + name: "ScheduledExpirationTime", + table: "AppAnnouncements", + newName: "ExpirationTime"); + } + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.Designer.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.Designer.cs new file mode 100644 index 00000000..310accee --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.Designer.cs @@ -0,0 +1,3348 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using SuperAbp.Exam.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace SuperAbp.Exam.Migrations +{ + [DbContext(typeof(ExamDbContext))] + [Migration("20260210052804_RenameAnnouncementTimeFields")] + partial class RenameAnnouncementTimeFields + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(5000) + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ScheduledExpirationTime") + .HasColumnType("datetime2"); + + b.Property("ScheduledPublishTime") + .HasColumnType("datetime2"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("AppAnnouncements", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppAnnouncementCategories", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.Exams.Examination", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AnswerMode") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManualReview") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("MaxNumberOfTimes") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PaperId") + .HasColumnType("uniqueidentifier"); + + b.Property("PassingScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("RandomOrderOfOption") + .HasColumnType("bit"); + + b.Property("ReviewMode") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalTime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("PaperId"); + + b.ToTable("AppExaminations", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestionReviews.UserExamQuestionReview", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserExamQuestionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamQuestionId"); + + b.ToTable("AppUserExamQuestionReviews", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Answers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Reason") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserExamSectionId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamSectionId"); + + b.ToTable("AppUserExamQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExam", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExamId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FinishedTime") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPassed") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppUserExams", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ScoreEach") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("SectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalCount") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("UserExamId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserExamId"); + + b.ToTable("AppUserExamSections", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Favorites.Favorite", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppFavorites", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.KnowledgePoints.KnowledgePoint", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppKnowledgePoints", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Mistakes.Mistake", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppMistakes", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestionRules.PaperQuestionRule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Count") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KnowledgePointId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaperSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PaperSectionId"); + + b.ToTable("AppPaperQuestionRules", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManualReview") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PaperType") + .HasColumnType("int"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalQuestionCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AppPapers", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PaperSectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Score") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PaperSectionId"); + + b.ToTable("AppPaperQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PaperId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ScoreEach") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TotalCount") + .HasColumnType("int"); + + b.Property("TotalScore") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("PaperId"); + + b.ToTable("AppPaperSections", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.QuestionBanks.QuestionBank", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppQuestionBanks", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.QuestionKnowledgePoints.QuestionKnowledgePoint", b => + { + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("KnowledgePointId") + .HasColumnType("uniqueidentifier"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("QuestionId", "KnowledgePointId"); + + b.HasIndex("QuestionId", "KnowledgePointId"); + + b.ToTable("AppQuestionKnowledgePoints", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.Question", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Analysis") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixedOrder") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .HasColumnType("int"); + + b.Property("RequiredAnswerCount") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppQuestions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.QuestionOptions.QuestionOption", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Analysis") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.ToTable("AppQuestionOptions", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.TrainingManagement.Training", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("QuestionBankId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Right") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TrainingSource") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("AppTrainings", (string)null); + }); + + modelBuilder.Entity("SuperAbp.MenuManagement.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Group") + .HasColumnType("bit"); + + b.Property("HideInBreadcrumb") + .HasColumnType("bit"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Key") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Permission") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Route") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Sort") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("SuperAbpMenu", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientUri") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(max)"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("bit"); + + b.Property("IsInherited") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.Announcement", b => + { + b.HasOne("SuperAbp.Exam.Announcements.AnnouncementCategory", "Category") + .WithMany("Announcements") + .HasForeignKey("CategoryId"); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestionReviews.UserExamQuestionReview", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", "Question") + .WithMany("QuestionReviews") + .HasForeignKey("UserExamQuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", null) + .WithMany("Questions") + .HasForeignKey("UserExamSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.HasOne("SuperAbp.Exam.ExamManagement.UserExams.UserExam", null) + .WithMany("Sections") + .HasForeignKey("UserExamId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.PaperQuestionRules.PaperQuestionRule", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") + .WithMany("PaperQuestionRules") + .HasForeignKey("PaperSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaperSection"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperQuestion", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.PaperSection", "PaperSection") + .WithMany("PaperQuestions") + .HasForeignKey("PaperSectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PaperSection"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.HasOne("SuperAbp.Exam.PaperManagement.Papers.Paper", null) + .WithMany("PaperSections") + .HasForeignKey("PaperId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.QuestionOptions.QuestionOption", b => + { + b.HasOne("SuperAbp.Exam.QuestionManagement.Questions.Question", "Question") + .WithMany("Options") + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("SuperAbp.MenuManagement.Menus.Menu", b => + { + b.HasOne("SuperAbp.MenuManagement.Menus.Menu", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SuperAbp.Exam.Announcements.AnnouncementCategory", b => + { + b.Navigation("Announcements"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExamQuestions.UserExamQuestion", b => + { + b.Navigation("QuestionReviews"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExam", b => + { + b.Navigation("Sections"); + }); + + modelBuilder.Entity("SuperAbp.Exam.ExamManagement.UserExams.UserExamSection", b => + { + b.Navigation("Questions"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.Paper", b => + { + b.Navigation("PaperSections"); + }); + + modelBuilder.Entity("SuperAbp.Exam.PaperManagement.Papers.PaperSection", b => + { + b.Navigation("PaperQuestionRules"); + + b.Navigation("PaperQuestions"); + }); + + modelBuilder.Entity("SuperAbp.Exam.QuestionManagement.Questions.Question", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.cs new file mode 100644 index 00000000..560ef572 --- /dev/null +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260210052804_RenameAnnouncementTimeFields.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SuperAbp.Exam.Migrations +{ + /// + public partial class RenameAnnouncementTimeFields : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "PublishTime", + table: "AppAnnouncements", + newName: "ScheduledPublishTime"); + + migrationBuilder.RenameColumn( + name: "ExpirationTime", + table: "AppAnnouncements", + newName: "ScheduledExpirationTime"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "ScheduledPublishTime", + table: "AppAnnouncements", + newName: "PublishTime"); + + migrationBuilder.RenameColumn( + name: "ScheduledExpirationTime", + table: "AppAnnouncements", + newName: "ExpirationTime"); + } + } +} diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs index c92484dc..4e3c2d38 100644 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs +++ b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/ExamDbContextModelSnapshot.cs @@ -60,9 +60,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("ExpirationTime") - .HasColumnType("datetime2"); - b.Property("ExtraProperties") .IsRequired() .HasColumnType("nvarchar(max)") @@ -85,7 +82,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("PublishTime") + b.Property("ScheduledExpirationTime") + .HasColumnType("datetime2"); + + b.Property("ScheduledPublishTime") .HasColumnType("datetime2"); b.Property("Sort") diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs index fa2886d6..33f00e54 100644 --- a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs @@ -82,7 +82,7 @@ public async Task Should_Publish() var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement4Id); updatedAnnouncement.IsPublished.ShouldBeTrue(); - updatedAnnouncement.PublishTime.ShouldBeNull(); + updatedAnnouncement.ScheduledPublishTime.ShouldBeNull(); } [Fact] @@ -92,7 +92,8 @@ public async Task Should_Unpublish() var updatedAnnouncement = await _repository.GetAsync(_testData.Announcement1Id); updatedAnnouncement.IsPublished.ShouldBeFalse(); - updatedAnnouncement.PublishTime.ShouldNotBeNull(); + updatedAnnouncement.ScheduledPublishTime.ShouldBeNull(); + updatedAnnouncement.ScheduledExpirationTime.ShouldBeNull(); } [Fact] diff --git a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs index f1ebd0ce..b243dd11 100644 --- a/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs +++ b/aspnet-core/test/SuperAbp.Exam.TestBase/ExamTestDataBuilder.cs @@ -172,7 +172,7 @@ private async Task CreateAnnouncementAsync() 1, testData.AnnouncementCategory1Id ); - announcement1.PublishTime = DateTime.Now.AddDays(-1); + announcement1.ScheduledPublishTime = DateTime.Now.AddDays(-1); announcement1.Publish(); var announcement2 = new Announcement( @@ -182,7 +182,7 @@ private async Task CreateAnnouncementAsync() 2, testData.AnnouncementCategory2Id ); - announcement2.PublishTime = DateTime.Now; + announcement2.ScheduledPublishTime = DateTime.Now; announcement2.Publish(); var announcement3 = new Announcement( @@ -192,7 +192,7 @@ private async Task CreateAnnouncementAsync() 3, testData.AnnouncementCategory1Id ); - announcement3.PublishTime = DateTime.Now.AddHours(-2); + announcement3.ScheduledPublishTime = DateTime.Now.AddHours(-2); announcement3.Publish(); var announcement4 = new Announcement( From 5b12346e638afef117feb135f41e267c91e5b8fd Mon Sep 17 00:00:00 2001 From: snow Date: Tue, 10 Feb 2026 14:03:16 +0800 Subject: [PATCH 6/6] fix bugs --- ...0209000000_RenameAnnouncementTimeFields.cs | 38 ------------------- .../AnnouncementAdminAppServiceTests.cs | 26 ++++++++++--- 2 files changed, 21 insertions(+), 43 deletions(-) delete mode 100644 aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs diff --git a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs b/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs deleted file mode 100644 index e9f9e900..00000000 --- a/aspnet-core/src/SuperAbp.Exam.EntityFrameworkCore/Migrations/20260209000000_RenameAnnouncementTimeFields.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace SuperAbp.Exam.Migrations -{ - /// - public partial class RenameAnnouncementTimeFields : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "PublishTime", - table: "AppAnnouncements", - newName: "ScheduledPublishTime"); - - migrationBuilder.RenameColumn( - name: "ExpirationTime", - table: "AppAnnouncements", - newName: "ScheduledExpirationTime"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ScheduledPublishTime", - table: "AppAnnouncements", - newName: "PublishTime"); - - migrationBuilder.RenameColumn( - name: "ScheduledExpirationTime", - table: "AppAnnouncements", - newName: "ExpirationTime"); - } - } -} diff --git a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs index 33f00e54..58253111 100644 --- a/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs +++ b/aspnet-core/test/SuperAbp.Exam.Application.Tests/Announcements/AnnouncementAdminAppServiceTests.cs @@ -1,9 +1,7 @@ using Shouldly; using System; using System.Threading.Tasks; -using SuperAbp.Exam.Admin.Announcements; using SuperAbp.Exam.Announcements; -using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Volo.Abp.Modularity; using Xunit; @@ -68,13 +66,31 @@ public async Task Should_Update() CategoryId = _testData.AnnouncementCategory1Id }; - var result = await _adminAppService.UpdateAsync(_testData.Announcement1Id, input); + var result = await _adminAppService.UpdateAsync(_testData.Announcement4Id, input); result.ShouldNotBeNull(); result.Title.ShouldBe(input.Title); result.Content.ShouldBe(input.Content); result.Sort.ShouldBe(input.Sort); } + [Fact] + public async Task Should_Throw_When_Update_Published_Announcement() + { + var input = new AnnouncementUpdateDto + { + Title = "Updated Announcement", + Content = "Updated Content", + Sort = 10, + CategoryId = _testData.AnnouncementCategory1Id + }; + + var exception = await Should.ThrowAsync( + async () => await _adminAppService.UpdateAsync(_testData.Announcement1Id, input) + ); + + exception.ShouldNotBeNull(); + } + [Fact] public async Task Should_Publish() { @@ -99,8 +115,8 @@ public async Task Should_Unpublish() [Fact] public async Task Should_Delete() { - await _adminAppService.DeleteAsync(_testData.Announcement1Id); + await _adminAppService.DeleteAsync(_testData.Announcement2Id); - await Should.ThrowAsync(async () => await _repository.GetAsync(_testData.Announcement1Id)); + await Should.ThrowAsync(async () => await _repository.GetAsync(_testData.Announcement2Id)); } } \ No newline at end of file