├── modules
├── 01_Blog
│ ├── Blog.UI
│ │ ├── .env
│ │ ├── .eslintrc.js
│ │ ├── src
│ │ │ ├── index.js
│ │ │ ├── store
│ │ │ │ └── index.js
│ │ │ ├── api
│ │ │ │ └── article.js
│ │ │ └── main.js
│ │ ├── .prettierrc
│ │ └── .vscode
│ │ │ └── settings.json
│ ├── Blog.Web
│ │ ├── _modules
│ │ │ └── 6221_Blog
│ │ │ │ └── _module.json
│ │ └── Blog.Web.csproj
│ └── Blog.Core
│ │ ├── Application
│ │ └── Article
│ │ │ ├── ArticleService.cs
│ │ │ └── IArticleService.cs
│ │ ├── Blog.Core.csproj
│ │ ├── Infrastructure
│ │ ├── BlogDbContext.cs
│ │ └── Repositories
│ │ │ └── ArticleRepository.cs
│ │ └── Domain
│ │ └── Article
│ │ ├── IArticleRepository.cs
│ │ └── ArticleEntity.cs
├── 00_Admin
│ ├── Admin.UI
│ │ ├── .env
│ │ ├── .env.development
│ │ ├── src
│ │ │ ├── api
│ │ │ │ ├── dict
│ │ │ │ │ ├── dto.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── dictItem
│ │ │ │ │ └── index.ts
│ │ │ │ ├── http.ts
│ │ │ │ ├── dictGroup
│ │ │ │ │ └── index.ts
│ │ │ │ ├── module
│ │ │ │ │ └── index.ts
│ │ │ │ ├── menuGroup
│ │ │ │ │ └── index.ts
│ │ │ │ ├── common
│ │ │ │ │ └── index.ts
│ │ │ │ ├── account
│ │ │ │ │ └── index.ts
│ │ │ │ ├── menu
│ │ │ │ │ └── index.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── role
│ │ │ │ │ └── index.ts
│ │ │ │ └── authorize
│ │ │ │ │ └── index.ts
│ │ │ ├── types
│ │ │ │ ├── mod.d.ts
│ │ │ │ ├── env.d.ts
│ │ │ │ ├── mkh.d.ts
│ │ │ │ └── menu.ts
│ │ │ ├── locales
│ │ │ │ ├── lang
│ │ │ │ │ ├── zh-cn
│ │ │ │ │ │ └── routes.ts
│ │ │ │ │ ├── en
│ │ │ │ │ │ └── routes.ts
│ │ │ │ │ └── th
│ │ │ │ │ │ └── routes.ts
│ │ │ │ └── index.ts
│ │ │ ├── components
│ │ │ │ ├── role-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── platform-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── module-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── enum-radio
│ │ │ │ │ └── index.vue
│ │ │ │ ├── enum-checkbox
│ │ │ │ │ └── index.vue
│ │ │ │ ├── dict-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── dict-cascader
│ │ │ │ │ └── index.vue
│ │ │ │ └── enum-select
│ │ │ │ │ └── index.vue
│ │ │ ├── store
│ │ │ │ └── index.ts
│ │ │ ├── views
│ │ │ │ ├── module
│ │ │ │ │ └── index
│ │ │ │ │ │ └── page.ts
│ │ │ │ └── account
│ │ │ │ │ └── index
│ │ │ │ │ └── page.ts
│ │ │ ├── options
│ │ │ │ ├── locale.en.ts
│ │ │ │ ├── locale.zh-cn.ts
│ │ │ │ ├── locale.th.ts
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ └── main.ts
│ │ ├── tsconfig.json
│ │ ├── .prettierrc
│ │ ├── tsconfig.lib.json
│ │ ├── .vscode
│ │ │ └── settings.json
│ │ ├── build
│ │ │ ├── app.config.ts
│ │ │ ├── lib.config.ts
│ │ │ └── patch-types.ts
│ │ ├── .eslintrc
│ │ ├── tsconfig.base.json
│ │ └── api-extractor.json
│ ├── Admin.Core
│ │ ├── Domain
│ │ │ ├── Dict
│ │ │ │ ├── DictEntity.Extend.cs
│ │ │ │ ├── IDictRepository.cs
│ │ │ │ └── DictEntity.cs
│ │ │ ├── Menu
│ │ │ │ ├── IMenuRepository.cs
│ │ │ │ ├── MenuType.cs
│ │ │ │ └── MenuOpenTarget.cs
│ │ │ ├── Role
│ │ │ │ ├── IRoleRepository.cs
│ │ │ │ ├── RoleEntity.Extend.cs
│ │ │ │ └── RoleEntity.cs
│ │ │ ├── DictItem
│ │ │ │ └── IDictItemRepository.cs
│ │ │ ├── RoleMenu
│ │ │ │ ├── IRoleMenuRepository.cs
│ │ │ │ └── RoleMenuEntity.cs
│ │ │ ├── DictGroup
│ │ │ │ ├── IDictGroupRepository.cs
│ │ │ │ └── DictGroupEntity.cs
│ │ │ ├── MenuGroup
│ │ │ │ ├── IMenuGroupRepository.cs
│ │ │ │ └── MenuGroupEntity.cs
│ │ │ ├── RoleButton
│ │ │ │ ├── IRoleButtonRepository.cs
│ │ │ │ └── RoleButtonEntity.cs
│ │ │ ├── AccountSkin
│ │ │ │ ├── IAccountSkinRepository.cs
│ │ │ │ └── AccountSkinEntity.cs
│ │ │ ├── JwtAuthInfo
│ │ │ │ └── IJwtAuthInfoRepository.cs
│ │ │ ├── RolePermission
│ │ │ │ ├── IRolePermissionRepository.cs
│ │ │ │ └── RolePermissionEntity.cs
│ │ │ └── Account
│ │ │ │ └── AccountEntity.Extend.cs
│ │ ├── Infrastructure
│ │ │ ├── AdminDbContext.cs
│ │ │ ├── Repositories
│ │ │ │ ├── MenuRepository.cs
│ │ │ │ ├── RoleRepository.cs
│ │ │ │ ├── DictItemRepository.cs
│ │ │ │ ├── RoleMenuRepository.cs
│ │ │ │ ├── DictGroupRepository.cs
│ │ │ │ ├── MenuGroupRepository.cs
│ │ │ │ ├── RoleButtonRepository.cs
│ │ │ │ ├── AccountSkinRepository.cs
│ │ │ │ ├── JwtAuthInfoRepository.cs
│ │ │ │ └── RolePermissionRepository.cs
│ │ │ ├── AdminConfig.cs
│ │ │ ├── AdminException.cs
│ │ │ ├── ModuleServicesConfigurator.cs
│ │ │ ├── AdminLocalizer.cs
│ │ │ ├── Defaults
│ │ │ │ ├── DefaultCredentialClaimExtender.cs
│ │ │ │ └── DefaultPasswordHandler.cs
│ │ │ ├── IAccountPermissionResolver.cs
│ │ │ ├── IPasswordHandler.cs
│ │ │ ├── IAccountProfileResolver.cs
│ │ │ ├── ICredentialClaimExtender.cs
│ │ │ └── IVerifyCodeProvider.cs
│ │ └── Application
│ │ │ ├── DictGroup
│ │ │ └── Dto
│ │ │ │ ├── DictGroupQueryDto.cs
│ │ │ │ ├── DictGroupUpdateDto.cs
│ │ │ │ └── DictGroupAddDto.cs
│ │ │ ├── MenuGroup
│ │ │ └── Dto
│ │ │ │ ├── MenuGroupQueryDto.cs
│ │ │ │ ├── MenuGroupAddDto.cs
│ │ │ │ └── MenuGroupUpdateDto.cs
│ │ │ ├── Dict
│ │ │ └── Dto
│ │ │ │ ├── DictUpdateDto.cs
│ │ │ │ ├── DictQueryDto.cs
│ │ │ │ └── DictAddDto.cs
│ │ │ ├── Menu
│ │ │ └── Dto
│ │ │ │ ├── MenuUpdateDto.cs
│ │ │ │ └── MenuQueryDto.cs
│ │ │ ├── DictItem
│ │ │ └── Dto
│ │ │ │ ├── DictItemUpdateDto.cs
│ │ │ │ └── DictItemQueryDto.cs
│ │ │ ├── Role
│ │ │ └── Dto
│ │ │ │ ├── RoleUpdateDto.cs
│ │ │ │ └── RoleAddDto.cs
│ │ │ ├── Account
│ │ │ └── Dto
│ │ │ │ ├── AccountQueryDto.cs
│ │ │ │ ├── AccountUpdateDto.cs
│ │ │ │ └── AccountSkinUpdateDto.cs
│ │ │ └── Authorize
│ │ │ ├── Vo
│ │ │ └── ProfileSkinVo.cs
│ │ │ └── Dto
│ │ │ └── RefreshTokenDto.cs
│ └── Admin.Web
│ │ ├── _modules
│ │ └── 6220_Admin
│ │ │ └── _module.json
│ │ ├── ModuleController.cs
│ │ ├── Admin.Web.csproj
│ │ └── Controllers
│ │ └── ModuleController.cs
└── WebHost
│ ├── Program.cs
│ ├── Properties
│ └── launchSettings.json
│ └── appsettings.Development.json
├── img
├── logo.png
└── cli_demo.gif
├── test
├── 02_Data
│ ├── Data.Web.Test
│ │ ├── Startup.cs
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── Data.Web.Test.csproj
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── Controllers
│ │ │ └── TransactionAttributeController.cs
│ │ └── Program.cs
│ ├── Data.Adapter.MySql.Test
│ │ ├── BaseTest.cs
│ │ └── DbContextTests.cs
│ ├── Data.Adapter.Sqlite.Test
│ │ ├── BaseTest.cs
│ │ └── DbContextTests.cs
│ ├── Data.Adapter.PostgreSQL.Test
│ │ ├── BaseTest.cs
│ │ ├── Domain
│ │ │ ├── Json
│ │ │ │ ├── IJsonRepository.cs
│ │ │ │ └── JsonEntity.cs
│ │ │ └── MoreDataType
│ │ │ │ └── IMoreDataTypeRepository.cs
│ │ ├── Infrastructure
│ │ │ └── Repositories
│ │ │ │ ├── JsonRepository.cs
│ │ │ │ └── MoreDataTypeRepository.cs
│ │ └── DbContextTests.cs
│ ├── Data.Adapter.SqlServer.Test
│ │ ├── BaseTest.cs
│ │ └── DbContextTests.cs
│ ├── Data.Common.Test
│ │ ├── Infrastructure
│ │ │ ├── BlogDbContext.cs
│ │ │ └── Repositories
│ │ │ │ ├── ArticleRepository.cs
│ │ │ │ └── CategoryRepository.cs
│ │ ├── Service
│ │ │ └── IArticleService.cs
│ │ ├── Domain
│ │ │ ├── Article
│ │ │ │ ├── IArticleRepository.cs
│ │ │ │ └── ArticleEntity.cs
│ │ │ └── Category
│ │ │ │ ├── ICategoryRepository.cs
│ │ │ │ └── CategoryEntity.cs
│ │ └── CustomAccountResolver.cs
│ └── Data.Core.Test
│ │ └── EntityDescriptorTests.cs
├── Directory.Build.props
└── 01_Utils
│ ├── Utils.Web.Test
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── Utils.Web.Test.csproj
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
│ └── Utils.Tests
│ ├── Product.cs
│ ├── Models
│ └── ResultModelTests.cs
│ ├── BaseTest.cs
│ ├── Extensions
│ ├── ArrayExtensionsTests.cs
│ └── EnumerableExtensionsTests.cs
│ └── Encrypt
│ ├── Md5EncryptTests.cs
│ └── TripleDesEncryptTests.cs
├── src
├── Config
│ ├── Config.Abstractions
│ │ ├── IConfig.cs
│ │ ├── Config.Abstractions.csproj
│ │ └── IConfigProvider.cs
│ └── Config.Core
│ │ ├── Config.Core.csproj
│ │ └── ModuleConfigureContextExtensions.cs
├── Data
│ ├── Data.Abstractions
│ │ ├── Entities
│ │ │ ├── IEntity.cs
│ │ │ ├── Entity.cs
│ │ │ ├── ITenant.cs
│ │ │ └── ISoftDelete.cs
│ │ ├── Annotations
│ │ │ ├── KeyAttribute.cs
│ │ │ ├── NullableAttribute.cs
│ │ │ ├── NotMappingColumnAttribute.cs
│ │ │ ├── EnableEntityAddEvent.cs
│ │ │ ├── EnableEntityAllEvent.cs
│ │ │ ├── EnableEntityDeleteEvent.cs
│ │ │ ├── EnableEntityUpdateEvent.cs
│ │ │ ├── IgnoreOnEntityEvent.cs
│ │ │ ├── EnableEntitySoftDeleteEvent.cs
│ │ │ ├── TransactionAttribute.cs
│ │ │ ├── LengthAttribute.cs
│ │ │ └── PrecisionAttribute.cs
│ │ ├── Exceptions
│ │ │ ├── EntityAddException.cs
│ │ │ ├── EntityUpdateException.cs
│ │ │ └── EntityNotFoundException.cs
│ │ ├── Logger
│ │ │ ├── IDbLoggerProvider.cs
│ │ │ └── DbLogger.cs
│ │ ├── Query
│ │ │ ├── QuerySortDto.cs
│ │ │ ├── IShardingByMonthQuery.cs
│ │ │ └── QueryPagingDto.cs
│ │ ├── Schema
│ │ │ ├── TableSchema.cs
│ │ │ └── DatabaseSchema.cs
│ │ ├── ICodeFirstProvider.cs
│ │ ├── IRepositoryManager.cs
│ │ ├── IUnitOfWork.cs
│ │ ├── IOperatorResolver.cs
│ │ ├── Descriptors
│ │ │ └── IRepositoryDescriptor.cs
│ │ ├── Data.Abstractions.csproj
│ │ ├── Extensions
│ │ │ └── EnumerableExtensions.cs
│ │ └── Sharding
│ │ │ ├── IShardingPolicyProvider.cs
│ │ │ └── ShardingPolicy.cs
│ ├── Data.Core
│ │ ├── Internal
│ │ │ ├── DefaultOperatorResolver.cs
│ │ │ ├── DbConstants.cs
│ │ │ ├── QueryStructure
│ │ │ │ ├── QueryGroupBy.cs
│ │ │ │ └── QueryUpdate.cs
│ │ │ └── RepositoryManager.cs
│ │ ├── DbLoggerProvider.cs
│ │ ├── Descriptors
│ │ │ └── RepositoryDescriptor.cs
│ │ ├── Data.Core.csproj
│ │ ├── Sharding
│ │ │ └── Providers
│ │ │ │ ├── DayShardingPolicyProvider.cs
│ │ │ │ ├── MonthShardingPolicyProvider.cs
│ │ │ │ └── YearShardingPolicyProvider.cs
│ │ └── Repository
│ │ │ └── RepositoryAbstract.Exists.cs
│ └── Adapters
│ │ ├── Data.Adapter.Sqlite
│ │ ├── GuidTypeHandler.cs
│ │ ├── Data.Adapter.Sqlite.csproj
│ │ └── SqliteExtensions.cs
│ │ ├── Data.Adapter.PostgreSQL
│ │ └── Data.Adapter.PostgreSQL.csproj
│ │ ├── Data.Adapter.MySql
│ │ ├── Data.Adapter.MySql.csproj
│ │ └── MySqlExtensions.cs
│ │ └── Data.Adapter.SqlServer
│ │ ├── Data.Adapter.SqlServer.csproj
│ │ └── SqlServerExtensions.cs
├── Auth
│ ├── Auth.Core
│ │ ├── PermissionRequirement.cs
│ │ ├── DefaultPermissionValidateHandler.cs
│ │ ├── DefaultTenantResolver.cs
│ │ ├── MkhAuthBuilder.cs
│ │ ├── DefaultPlatformProvider.cs
│ │ └── Auth.Core.csproj
│ ├── Auth.Abstractions
│ │ ├── ICredential.cs
│ │ ├── Annotations
│ │ │ ├── AllowWhenAuthenticatedAttribute.cs
│ │ │ └── DisableAuditAttribute.cs
│ │ ├── Auth.Abstractions.csproj
│ │ ├── IPermissionResolver.cs
│ │ ├── IPermissionValidateHandler.cs
│ │ ├── ICredentialBuilder.cs
│ │ ├── ITenantResolver.cs
│ │ └── IPlatformProvider.cs
│ └── Auth.Jwt
│ │ ├── Auth.Jwt.csproj
│ │ ├── JwtOptions.cs
│ │ └── JwtCredential.cs
├── Utils
│ ├── Utils
│ │ ├── Enums
│ │ │ ├── Sex.cs
│ │ │ ├── Whether.cs
│ │ │ └── Week.cs
│ │ ├── Annotations
│ │ │ ├── IgnoreAttribute.cs
│ │ │ ├── SwaggerIgnoreAttribute.cs
│ │ │ ├── ScopedInjectAttribute.cs
│ │ │ ├── TransientInjectAttribute.cs
│ │ │ ├── SingletonInjectAttribute.cs
│ │ │ └── ObjectMapAttribute.cs
│ │ ├── App
│ │ │ └── IAppShutdownHandler.cs
│ │ ├── Exceptions
│ │ │ ├── MkhSystemException.cs
│ │ │ └── MkhBusinessException.cs
│ │ ├── Models
│ │ │ ├── OptionCollectionResultModel.cs
│ │ │ └── FileDownloadModel.cs
│ │ ├── Validations
│ │ │ ├── PhoneValidationAttribute.cs
│ │ │ └── GuidNotEmptyValidationAttribute.cs
│ │ ├── File
│ │ │ ├── FileSizeUnit.cs
│ │ │ └── FileExtensions.cs
│ │ ├── Extensions
│ │ │ ├── ServiceCollectionExtensions.cs
│ │ │ ├── GuidExtensions.cs
│ │ │ ├── ArrayExtensions.cs
│ │ │ └── ConfigurationExtensions.cs
│ │ ├── Map
│ │ │ └── IMapper.cs
│ │ ├── Json
│ │ │ └── Converters
│ │ │ │ └── DateTimeConverter.cs
│ │ └── Utils.csproj
│ └── Utils.Web
│ │ ├── ActionDescriptor.cs
│ │ ├── Utils.Web.csproj
│ │ ├── Extensions
│ │ └── HttpRequestExtensions.cs
│ │ └── ControllerDescriptor.cs
├── TaskScheduler
│ ├── TaskScheduler.Core
│ │ ├── TaskCollection.cs
│ │ ├── TaskScheduler.Core.csproj
│ │ └── TaskDescriptor.cs
│ └── TaskScheduler.Abstractions
│ │ ├── ITaskCollection.cs
│ │ ├── TaskScheduler.Abstractions.csproj
│ │ ├── ITask.cs
│ │ ├── TaskExecutionContext.cs
│ │ └── ITaskDescriptor.cs
├── Module
│ ├── Module.Abstractions
│ │ ├── IModuleLocalizer.cs
│ │ ├── Options
│ │ │ ├── ModuleOptions.cs
│ │ │ └── CommonOptions.cs
│ │ ├── Module.Abstractions.csproj
│ │ ├── IModuleCollection.cs
│ │ ├── ModuleLayerAssemblies.cs
│ │ ├── ModuleEnumDescriptor.cs
│ │ ├── IModuleServicesConfigurator.cs
│ │ └── ModuleConfigureContext.cs
│ ├── Module.Web
│ │ ├── IModuleMvcOptionsConfigurator.cs
│ │ └── Module.Web.csproj
│ └── Module.Core
│ │ ├── Module.Core.csproj
│ │ ├── Constants.cs
│ │ └── ModuleLocalizerAbstract.cs
├── Excel
│ ├── Excel.Core
│ │ ├── Excel.Core.csproj
│ │ └── ServiceCollectionExtensions.cs
│ ├── Excel.Abstractions
│ │ ├── Annotations
│ │ │ └── IgnoreOnExcelExportAttribute.cs
│ │ ├── ExcelOptions.cs
│ │ ├── ExcelModel.cs
│ │ ├── Export
│ │ │ ├── IExcelExportQuery.cs
│ │ │ ├── ExcelExportTemplateModel.cs
│ │ │ └── IExcelExportBuilder.cs
│ │ ├── Excel.Abstractions.csproj
│ │ ├── ExcelOptionsBuilder.cs
│ │ └── IExcelProvider.cs
│ └── Providers
│ │ └── Excel.EPPlus
│ │ ├── Excel.EPPlus.csproj
│ │ ├── EPPlusExcelProvider.cs
│ │ └── ExcelOptionsBuilderExtensions.cs
├── Logging
│ ├── Logging.Abstractions
│ │ ├── Logging.Abstractions.csproj
│ │ └── BaseLogModel.cs
│ └── Logging.Core
│ │ ├── Logging.Core.csproj
│ │ ├── ServiceCollectionExtensions.cs
│ │ └── DefaultProviders
│ │ ├── LoginLogHandler.cs
│ │ └── AuditLogHandler.cs
├── Idenity
│ ├── Identity.Abstractions
│ │ └── Identity.Abstractions.csproj
│ └── Identity.Core
│ │ ├── Identity.Core.csproj
│ │ └── ServiceCollectionExtensions.cs
├── MessageQueue
│ └── MessageQueue.RabbitMQ
│ │ ├── DefaultExchange.cs
│ │ ├── MessageQueue.RabbitMQ.csproj
│ │ ├── Consumer.cs
│ │ ├── ServiceCollectionExtensions.cs
│ │ └── RabbitMQConfig.cs
├── Cache
│ ├── Cache.Core
│ │ ├── Cache.Core.csproj
│ │ ├── CacheBuilder.cs
│ │ └── ServiceCollectionExtensions.cs
│ ├── Cache.Abstractions
│ │ ├── Cache.Abstractions.csproj
│ │ └── ICacheBuilder.cs
│ └── Cache.Redis
│ │ ├── RedisOptions.cs
│ │ ├── Cache.Redis.csproj
│ │ └── IRedisSerializer.cs
└── Mapper
│ └── Mapper
│ ├── Mapper.csproj
│ └── DefaultMapper.cs
└── nuget_publish.ps1
/modules/01_Blog/Blog.UI/.env:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/.env:
--------------------------------------------------------------------------------
1 | MKH_API_URL=/api/
--------------------------------------------------------------------------------
/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/img/logo.png
--------------------------------------------------------------------------------
/img/cli_demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/img/cli_demo.gif
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/.env.development:
--------------------------------------------------------------------------------
1 | MKH_API_URL=http://localhost:6220/api/
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/dict/dto.ts:
--------------------------------------------------------------------------------
1 | export interface DictEntity {
2 | id: number
3 | }
4 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Web.Test/Startup.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/test/02_Data/Data.Web.Test/Startup.cs
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['plugin:vue/vue3-recommended', 'prettier'],
3 | }
4 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/src/index.js:
--------------------------------------------------------------------------------
1 | import mod from '@mkh-mod-blog'
2 | mod.callback = ({ store }) => {
3 | console.log(store)
4 | }
5 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.MySql.Test/BaseTest.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/test/02_Data/Data.Adapter.MySql.Test/BaseTest.cs
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.Sqlite.Test/BaseTest.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/test/02_Data/Data.Adapter.Sqlite.Test/BaseTest.cs
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.base.json",
3 | "include": [
4 | "build/**/*.ts",
5 | ]
6 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.PostgreSQL.Test/BaseTest.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/test/02_Data/Data.Adapter.PostgreSQL.Test/BaseTest.cs
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.SqlServer.Test/BaseTest.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/17MKH/Mkh/HEAD/test/02_Data/Data.Adapter.SqlServer.Test/BaseTest.cs
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/Dict/DictEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Mod.Admin.Core.Domain.Dict;
2 |
3 | public partial class DictEntity
4 | {
5 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "semi": false,
4 | "singleQuote": true,
5 | "printWidth": 200,
6 | "arrowParens": "avoid"
7 | }
8 |
--------------------------------------------------------------------------------
/src/Config/Config.Abstractions/IConfig.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Config.Abstractions;
2 |
3 | ///
4 | /// 配置类接口
5 | ///
6 | public interface IConfig
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "semi": false,
4 | "singleQuote": true,
5 | "printWidth": 200,
6 | "vueIndentScriptAndStyle": true
7 | }
8 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/dictItem/index.ts:
--------------------------------------------------------------------------------
1 | import { crud } from 'mkh-ui'
2 | import http from '../http'
3 |
4 | export default {
5 | ...crud(http, 'DictItem'),
6 | }
7 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Entities/IEntity.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Data.Abstractions.Entities;
2 |
3 | ///
4 | /// 实体接口
5 | ///
6 | public interface IEntity
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Web/_modules/6221_Blog/_module.json:
--------------------------------------------------------------------------------
1 | {"Id": 6221,"Name":"个人博客","Code":"Blog","Icon":"article","Version":"0.0.1","Description":"17MKH Module Blog(个人博客) - Blog.Web"}
2 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Web/_modules/6220_Admin/_module.json:
--------------------------------------------------------------------------------
1 | {"Id": 6220,"Name":"权限管理","Code":"Admin","Icon":"permission","Version":"1.3.1","Description":"17MKH Module Admin(权限管理) - Admin.Web"}
2 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Application/Article/ArticleService.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Mod.Blog.Core.Application.Article
2 | {
3 | public class ArticleService : IArticleService
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/types/mod.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'virtual:mkh-mod-admin*' {
2 | import type { ModuleDefinition } from 'mkh-ui'
3 | const mod: ModuleDefinition
4 | export default mod
5 | }
6 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/http.ts:
--------------------------------------------------------------------------------
1 | import { createHttp, bootstrapOptions } from 'mkh-ui'
2 | import mod from 'virtual:mkh-mod-admin?base'
3 |
4 | export default createHttp(bootstrapOptions, mod.code)
5 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/src/store/index.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | id: 1,
3 | }
4 |
5 | const mutations = {}
6 |
7 | export default {
8 | namespaced: true,
9 | state,
10 | mutations,
11 | }
12 |
--------------------------------------------------------------------------------
/src/Config/Config.Abstractions/Config.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH 配置抽象库
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
7 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/locales/lang/zh-cn/routes.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | admin_account: '账户管理',
3 | admin_dict: '字典管理',
4 | admin_menu: '菜单管理',
5 | admin_module: '模块中心',
6 | admin_role: '角色管理',
7 | }
8 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Blog.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/dictGroup/index.ts:
--------------------------------------------------------------------------------
1 | import { crud } from 'mkh-ui'
2 | import http from '../http'
3 |
4 | export default {
5 | ...crud(http, 'DictGroup'),
6 | select: () => http.get('DictGroup/Select'),
7 | }
8 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/components/role-select/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Infrastructure/BlogDbContext.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core;
2 |
3 | namespace Data.Common.Test.Infrastructure
4 | {
5 | public class BlogDbContext : DbContext
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/locales/lang/en/routes.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | admin_account: 'Account',
3 | admin_dict: 'Dictionary',
4 | admin_menu: 'Menu',
5 | admin_module: 'Module Center',
6 | admin_role: 'Role',
7 | }
8 |
--------------------------------------------------------------------------------
/modules/WebHost/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | using Mkh.Host.Web;
3 |
4 | namespace WebHost;
5 |
6 | public class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | new HostBootstrap().Run(args);
11 | }
12 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Service/IArticleService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Data.Common.Test.Service
4 | {
5 | public interface IArticleService
6 | {
7 | Task Add();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Web/ModuleController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using Mkh.Module.Web;
3 |
4 | namespace Mkh.Mod.Admin.Web;
5 |
6 | [Area("Admin")]
7 | public abstract class ModuleController : ControllerAbstract
8 | {
9 |
10 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Domain/Article/IArticleRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Data.Common.Test.Domain.Article
4 | {
5 | public interface IArticleRepository : IRepository
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/AdminDbContext.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core;
2 |
3 | namespace Mkh.Mod.Admin.Core.Infrastructure;
4 |
5 | ///
6 | /// 权限管理模块数据库上下文
7 | ///
8 | public class AdminDbContext : DbContext
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Application/Article/IArticleService.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Mod.Blog.Core.Application.Article
2 | {
3 | ///
4 | /// 文章服务
5 | ///
6 | public interface IArticleService
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/01_Utils/Utils.Web.Test/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Domain/Category/ICategoryRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Data.Common.Test.Domain.Category
4 | {
5 | public interface ICategoryRepository : IRepository
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Web.Test/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Auth/Auth.Core/PermissionRequirement.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Authorization;
2 |
3 | namespace Mkh.Auth.Core;
4 |
5 | public class PermissionRequirement : IAuthorizationRequirement
6 | {
7 | public PermissionRequirement()
8 | {
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Utils/Utils/Enums/Sex.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace Mkh.Utils.Enums;
4 |
5 | ///
6 | /// 性别
7 | ///
8 | public enum Sex
9 | {
10 | [Description("男")]
11 | Boy,
12 | [Description("女")]
13 | Girl
14 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/Menu/IMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.Menu;
4 |
5 | ///
6 | /// 菜单仓储
7 | ///
8 | public interface IMenuRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/test/01_Utils/Utils.Web.Test/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Web.Test/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/module/index.ts:
--------------------------------------------------------------------------------
1 | import http from '../http'
2 |
3 | const urls = {
4 | //获取权限列表
5 | GET_PERMISSIONS: 'Module/Permissions',
6 | }
7 |
8 | export default {
9 | getPermissions: (params) => http.get(urls.GET_PERMISSIONS, params),
10 | }
11 |
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/ICredential.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Utils.Json.Converters;
2 |
3 | namespace Mkh.Auth.Abstractions
4 | {
5 | ///
6 | /// 凭据
7 | ///
8 | [JsonPolymorphism]
9 | public interface ICredential
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/KeyAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations;
4 |
5 | ///
6 | /// 主键
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class KeyAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/Role/IRoleRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.Role;
4 |
5 | ///
6 | /// 角色仓储
7 | ///
8 | public interface IRoleRepository : IRepository
9 | {
10 |
11 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.base.json",
3 | "compilerOptions": {
4 | "declaration": true,
5 | },
6 | "include": [
7 | "src/**/*.ts",
8 | "src/**/*.d.ts",
9 | "src/**/*.vue"
10 | ]
11 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Infrastructure/BlogDbContext.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core;
2 |
3 | namespace Mkh.Mod.Blog.Core.Infrastructure
4 | {
5 | ///
6 | /// 博客模块数据库仓储
7 | ///
8 | public class BlogDbContext : DbContext
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/menuGroup/index.ts:
--------------------------------------------------------------------------------
1 | import { crud } from 'mkh-ui'
2 | import http from '../http'
3 |
4 | const urls = {
5 | SELECT: 'MenuGroup/Select',
6 | }
7 | export default {
8 | ...crud(http, 'MenuGroup'),
9 | select: () => http.get(urls.SELECT),
10 | }
11 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/store/index.ts:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 |
3 | export default defineStore('mod.admin', {
4 | state: () => {
5 | return {
6 | dict: {
7 | groupCode: '',
8 | dictCode: '',
9 | },
10 | }
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.defaultFormatter": "esbenp.prettier-vscode",
3 | "editor.formatOnPaste": true,
4 | "editor.formatOnSave": true,
5 | "editor.formatOnType": true,
6 | "editor.codeActionsOnSave": {
7 | "source.fixAll.eslint": true
8 | }
9 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/DictItem/IDictItemRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.DictItem;
4 |
5 | ///
6 | /// 数据字典项仓储
7 | ///
8 | public interface IDictItemRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/RoleMenu/IRoleMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.RoleMenu;
4 |
5 | ///
6 | /// 角色菜单绑定关系仓储
7 | ///
8 | public interface IRoleMenuRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.defaultFormatter": "esbenp.prettier-vscode",
3 | "editor.formatOnPaste": true,
4 | "editor.formatOnSave": true,
5 | "editor.formatOnType": true,
6 | "editor.codeActionsOnSave": {
7 | "source.fixAll.eslint": true
8 | }
9 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/DictGroup/IDictGroupRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.DictGroup;
4 |
5 | ///
6 | /// 数据字典分组仓储
7 | ///
8 | public interface IDictGroupRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/MenuGroup/IMenuGroupRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.MenuGroup;
4 |
5 | ///
6 | /// 菜单分组仓储
7 | ///
8 | public interface IMenuGroupRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/locales/lang/th/routes.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | admin_account: 'จัดการบัญชี',//'账户管理',
3 | admin_dict: 'จัดการประเภทหน่วย', //'字典管理',
4 | admin_menu: 'จัดการเมนู',//'菜单管理',
5 | admin_module: 'โมดูลผู้ดูแลระบบ',//'模块中心',
6 | admin_role: 'ตำแหน่ง', //'角色管理',
7 | }
8 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/NullableAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations;
4 |
5 | ///
6 | /// 可空的
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class NullableAttribute : Attribute
10 | {
11 |
12 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Exceptions/EntityAddException.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Utils.Exceptions;
2 |
3 | namespace Mkh.Data.Abstractions.Exceptions;
4 |
5 | public class EntityAddException : MkhSystemException
6 | {
7 | public EntityAddException() : base("Data", "AddError")
8 | {
9 | }
10 | }
--------------------------------------------------------------------------------
/src/TaskScheduler/TaskScheduler.Core/TaskCollection.cs:
--------------------------------------------------------------------------------
1 | using Mkh.TaskScheduler.Abstractions;
2 | using Mkh.Utils.Abstracts;
3 |
4 | namespace Mkh.TaskScheduler.Core
5 | {
6 | internal class TaskCollection : CollectionAbstract, ITaskCollection
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/RoleButton/IRoleButtonRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.RoleButton;
4 |
5 | ///
6 | /// 角色按钮绑定关系仓储
7 | ///
8 | public interface IRoleButtonRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/MenuRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.Menu;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class MenuRepository : RepositoryAbstract, IMenuRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/RoleRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.Role;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class RoleRepository : RepositoryAbstract, IRoleRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/types/env.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue' {
2 | import type { DefineComponent } from 'vue'
3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
4 | const component: DefineComponent<{}, {}, any>
5 | export default component
6 | }
7 |
--------------------------------------------------------------------------------
/src/Module/Module.Abstractions/IModuleLocalizer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Localization;
2 |
3 | namespace Mkh.Module.Abstractions
4 | {
5 | ///
6 | /// 模块多语言读取器
7 | ///
8 | public interface IModuleLocalizer : IStringLocalizer
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/AccountSkin/IAccountSkinRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.AccountSkin;
4 |
5 | ///
6 | /// 账户配置实体
7 | ///
8 | public interface IAccountSkinRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/JwtAuthInfo/IJwtAuthInfoRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.JwtAuthInfo;
4 |
5 | ///
6 | /// JWT认证信息仓储
7 | ///
8 | public interface IJwtAuthInfoRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Domain/Article/IArticleRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Blog.Core.Domain.Article
4 | {
5 | ///
6 | /// 文章仓储
7 | ///
8 | public interface IArticleRepository : IRepository
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Exceptions/EntityUpdateException.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Utils.Exceptions;
2 |
3 | namespace Mkh.Data.Abstractions.Exceptions;
4 |
5 | public class EntityUpdateException : MkhSystemException
6 | {
7 | public EntityUpdateException() : base("Data", "UpdateError")
8 | {
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/NotMappingColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations;
4 |
5 | ///
6 | /// 指定属性不映射列
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class NotMappingColumnAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/src/TaskScheduler/TaskScheduler.Abstractions/ITaskCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Mkh.TaskScheduler.Abstractions
4 | {
5 | ///
6 | /// 任务
7 | ///
8 | public interface ITaskCollection : IList
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Utils/Utils/Annotations/IgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Utils.Annotations;
4 |
5 | ///
6 | /// 忽略
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field)]
9 | public class IgnoreAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/types/mkh.d.ts:
--------------------------------------------------------------------------------
1 | import { ModuleDefinition } from 'mkh-ui'
2 |
3 | declare module 'mkh-ui' {
4 | export interface ModuleDefinition {
5 | /** 主题色 */
6 | color: string
7 | }
8 |
9 | export interface Profile {
10 | /** 角色编号 */
11 | roleId: string
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.UI/src/api/article.js:
--------------------------------------------------------------------------------
1 | const urls = {
2 | /** 获取账户默认密码 */
3 | DEFAULT_PASSWORD: 'Account/DefaultPassword',
4 | }
5 | export default http => {
6 | const getDefaultPassword = () => {
7 | return http.get(urls.DEFAULT_PASSWORD)
8 | }
9 |
10 | return { getDefaultPassword }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Exceptions/EntityNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Utils.Exceptions;
2 |
3 | namespace Mkh.Data.Abstractions.Exceptions;
4 |
5 | public class EntityNotFoundException : MkhSystemException
6 | {
7 | public EntityNotFoundException() : base("Data", "EntityNotFound")
8 | {
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Utils/Utils/Annotations/SwaggerIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Utils.Annotations;
4 |
5 | ///
6 | /// 在Swagger中忽略该字段或属性
7 | ///
8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
9 | public class SwaggerIgnoreAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/RolePermission/IRolePermissionRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.RolePermission;
4 |
5 | ///
6 | /// 角色权限绑定关系仓储
7 | ///
8 | public interface IRolePermissionRepository : IRepository
9 | {
10 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/DictItemRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.DictItem;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class DictItemRepository : RepositoryAbstract, IDictItemRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/RoleMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.RoleMenu;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class RoleMenuRepository : RepositoryAbstract, IRoleMenuRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/DictGroupRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.DictGroup;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class DictGroupRepository : RepositoryAbstract, IDictGroupRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/MenuGroupRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.MenuGroup;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class MenuGroupRepository : RepositoryAbstract, IMenuGroupRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/src/Excel/Excel.Core/Excel.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH Excel核心库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/RoleButtonRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.RoleButton;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class RoleButtonRepository : RepositoryAbstract, IRoleButtonRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/src/TaskScheduler/TaskScheduler.Abstractions/TaskScheduler.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH 任务调度抽象库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/AccountSkinRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.AccountSkin;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class AccountSkinRepository : RepositoryAbstract, IAccountSkinRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/JwtAuthInfoRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.JwtAuthInfo;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class JwtAuthInfoRepository : RepositoryAbstract, IJwtAuthInfoRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/modules/01_Blog/Blog.Core/Infrastructure/Repositories/ArticleRepository.cs:
--------------------------------------------------------------------------------
1 | using Blog.Core.Domain.Article;
2 | using Mkh.Data.Core.Repository;
3 |
4 | namespace Mkh.Mod.Blog.Core.Infrastructure.Repositories
5 | {
6 | public class ArticleRepository : RepositoryAbstract, IArticleRepository
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/EnableEntityAddEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 启用实体新增事件
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class EnableEntityAddEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/EnableEntityAllEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 启用实体所有事件
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class EnableEntityAllEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Utils/Utils/App/IAppShutdownHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Mkh.Utils.App;
4 |
5 | ///
6 | /// 应用关闭处理接口
7 | ///
8 | public interface IAppShutdownHandler
9 | {
10 | ///
11 | /// 处理
12 | ///
13 | ///
14 | Task Handle();
15 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Application/DictGroup/Dto/DictGroupQueryDto.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions.Query;
2 |
3 | namespace Mkh.Mod.Admin.Core.Application.DictGroup.Dto;
4 |
5 | public class DictGroupQueryDto : QueryDto
6 | {
7 | ///
8 | /// 分组名称
9 | ///
10 | public string Name { get; set; }
11 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Application/MenuGroup/Dto/MenuGroupQueryDto.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions.Query;
2 |
3 | namespace Mkh.Mod.Admin.Core.Application.MenuGroup.Dto;
4 |
5 | public class MenuGroupQueryDto : QueryDto
6 | {
7 | ///
8 | /// 菜单名称
9 | ///
10 | public string Name { get; set; }
11 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/EnableEntityDeleteEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 启用实体删除事件
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class EnableEntityDeleteEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/EnableEntityUpdateEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 启用实体更新事件
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class EnableEntityUpdateEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/IgnoreOnEntityEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 在实体事件中忽略指定属性
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class IgnoreOnEntityEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/test/01_Utils/Utils.Web.Test/Utils.Web.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Domain/Role/RoleEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions.Annotations;
2 |
3 | namespace Mkh.Mod.Admin.Core.Domain.Role;
4 |
5 | public partial class RoleEntity
6 | {
7 | ///
8 | /// 菜单组名称
9 | ///
10 | [NotMappingColumn]
11 | public string MenuGroupName { get; set; }
12 | }
--------------------------------------------------------------------------------
/src/Excel/Excel.Abstractions/Annotations/IgnoreOnExcelExportAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Excel.Abstractions.Annotations;
4 |
5 | ///
6 | /// Excel导出中忽略该属性
7 | ///
8 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
9 | public class IgnoreOnExcelExportAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Infrastructure/Repositories/ArticleRepository.cs:
--------------------------------------------------------------------------------
1 | using Data.Common.Test.Domain.Article;
2 | using Mkh.Data.Core.Repository;
3 |
4 | namespace Data.Common.Test.Infrastructure.Repositories
5 | {
6 | public class ArticleRepository : RepositoryAbstract, IArticleRepository
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/Repositories/RolePermissionRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Core.Repository;
2 | using Mkh.Mod.Admin.Core.Domain.RolePermission;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure.Repositories;
5 |
6 | public class RolePermissionRepository : RepositoryAbstract, IRolePermissionRepository
7 | {
8 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/EnableEntitySoftDeleteEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Annotations
4 | {
5 | ///
6 | /// 启用实体软删除事件
7 | ///
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class EnableEntitySoftDeleteEvent : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Logging/Logging.Abstractions/Logging.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH 日志抽象库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/types/menu.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 菜单树节点
3 | */
4 | export interface MenuTreeNode {
5 | id: number
6 | label: string
7 | children: MenuTreeNode[]
8 | path: string[]
9 | item: {
10 | id: number
11 | icon: string
12 | type: number
13 | locales: {
14 | 'zh-cn': string
15 | en: string
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/nuget_publish.ps1:
--------------------------------------------------------------------------------
1 | Write-Host '请输入Key:'
2 |
3 | $key = Read-Host
4 | $dir = './_packages'
5 |
6 | if(Test-Path -Path $dir){
7 | Remove-Item $dir -Recurse
8 | }
9 |
10 | dotnet build -c Release
11 |
12 | Get-ChildItem -Path $dir | ForEach-Object -Process{
13 | dotnet nuget push $_.fullname -s https://api.nuget.org/v3/index.json -k $key
14 | }
15 |
16 | pause
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/Annotations/AllowWhenAuthenticatedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Auth.Abstractions.Annotations;
4 |
5 | ///
6 | /// 只要认证就能访问,无需授权
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
9 | public class AllowWhenAuthenticatedAttribute : Attribute
10 | {
11 | }
--------------------------------------------------------------------------------
/src/Idenity/Identity.Abstractions/Identity.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH Identity Abstractions
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Common.Test/Infrastructure/Repositories/CategoryRepository.cs:
--------------------------------------------------------------------------------
1 | using Data.Common.Test.Domain.Category;
2 | using Mkh.Data.Core;
3 | using Mkh.Data.Core.Repository;
4 |
5 | namespace Data.Common.Test.Infrastructure.Repositories
6 | {
7 | public class CategoryRepository : RepositoryAbstract, ICategoryRepository
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.PostgreSQL.Test/Domain/Json/IJsonRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Data.Adapter.PostgreSQL.Test.Domain.Json;
9 |
10 | public interface IJsonRepository : IRepository
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/views/module/index/page.ts:
--------------------------------------------------------------------------------
1 | import type { PageDefinition } from 'mkh-ui'
2 | import component from './index.vue'
3 |
4 | const page: PageDefinition = {
5 | name: 'admin_module',
6 | icon: 'module',
7 | path: '/admin/module',
8 | permissions: ['admin_Module_Permissions_get'],
9 | buttons: {},
10 | component,
11 | }
12 |
13 | export default page
14 |
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/Annotations/DisableAuditAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Auth.Abstractions.Annotations
4 | {
5 | ///
6 | /// 禁用审计功能
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
9 | public class DisableAuditAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/AdminConfig.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Config.Abstractions;
2 |
3 | namespace Mkh.Mod.Admin.Core.Infrastructure;
4 |
5 | ///
6 | /// 权限管理配置信息
7 | ///
8 | public class AdminConfig : IConfig
9 | {
10 | ///
11 | /// 账户默认密码(新增账户或者重置密码时使用)
12 | ///
13 | public string DefaultPassword { get; set; } = "123456";
14 | }
--------------------------------------------------------------------------------
/src/Utils/Utils/Enums/Whether.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace Mkh.Utils.Enums;
4 |
5 | ///
6 | /// 是否
7 | ///
8 | public enum Whether
9 | {
10 | ///
11 | /// 是
12 | ///
13 | [Description("是")]
14 | True = 1,
15 | ///
16 | /// 否
17 | ///
18 | [Description("否")]
19 | False = 0
20 | }
--------------------------------------------------------------------------------
/src/Config/Config.Abstractions/IConfigProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Config.Abstractions;
2 |
3 | ///
4 | /// 配置提供器
5 | ///
6 | public interface IConfigProvider
7 | {
8 | ///
9 | /// 获取指定的配置实例
10 | ///
11 | ///
12 | ///
13 | TConfig Get() where TConfig : IConfig, new();
14 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Logger/IDbLoggerProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Data.Abstractions.Logger;
2 |
3 | ///
4 | /// 数据库日志提供器
5 | ///
6 | public interface IDbLoggerProvider
7 | {
8 | ///
9 | /// 日志记录
10 | ///
11 | /// 操作类型
12 | /// SQL语句
13 | void Write(string action, string sql);
14 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/common/index.ts:
--------------------------------------------------------------------------------
1 | import http from '../http';
2 |
3 | const urls = {
4 | //查询枚举选项列表
5 | ENUM_OPTIONS: 'Common/EnumOptions',
6 | //查询平台选项列表
7 | PLATFORM_OPTIONS: 'Common/PlatformOptions',
8 | }
9 |
10 | export default {
11 | queryEnumOptions: params => http.get(urls.ENUM_OPTIONS, params),
12 | queryPlatformOptions: () => http.get(urls.PLATFORM_OPTIONS),
13 | }
14 |
--------------------------------------------------------------------------------
/modules/WebHost/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebHost": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": "true",
6 | "launchBrowser": true,
7 | "launchUrl": "swagger",
8 | "applicationUrl": "http://localhost:6220",
9 | "environmentVariables": {
10 | "ASPNETCORE_ENVIRONMENT": "Development"
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Excel/Excel.Abstractions/ExcelOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Excel.Abstractions;
2 |
3 | ///
4 | /// Excel操作配置项
5 | ///
6 | public class ExcelOptions
7 | {
8 | ///
9 | /// 提供程序
10 | ///
11 | public string Provider { get; set; }
12 |
13 | ///
14 | /// Excel操作时产生的临时文件存储根路径
15 | ///
16 | public string TempDir { get; set; }
17 | }
--------------------------------------------------------------------------------
/src/MessageQueue/MessageQueue.RabbitMQ/DefaultExchange.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.MessageQueue.RabbitMQ;
2 |
3 | ///
4 | /// 默认交换器
5 | ///
6 | internal static class DefaultExchange
7 | {
8 | public const string Direct = "nm.direct";
9 |
10 | public const string Fanout = "nm.fanout";
11 |
12 | public const string Topic = "nm.topic";
13 |
14 | public const string Headers = "nm.headers";
15 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Adapter.PostgreSQL.Test/Domain/MoreDataType/IMoreDataTypeRepository.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Data.Adapter.PostgreSQL.Test.Domain.MoreDataType;
9 |
10 | public interface IMoreDataTypeRepository : IRepository
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/src/Excel/Providers/Excel.EPPlus/Excel.EPPlus.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH Excel EPPlus实现库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Entities/Entity.cs:
--------------------------------------------------------------------------------
1 | namespace Mkh.Data.Abstractions.Entities;
2 |
3 | ///
4 | /// 包含指定类型主键的实体
5 | ///
6 | public abstract class Entity : IEntity
7 | {
8 | ///
9 | /// 主键
10 | ///
11 | public virtual TKey Id { get; set; }
12 | }
13 |
14 | ///
15 | /// 含有自增主键的实体
16 | ///
17 | public class Entity : Entity
18 | {
19 |
20 | }
--------------------------------------------------------------------------------
/src/TaskScheduler/TaskScheduler.Abstractions/ITask.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Quartz;
3 |
4 | namespace Mkh.TaskScheduler.Abstractions
5 | {
6 | public interface ITask : IJob
7 | {
8 | ///
9 | /// 执行
10 | ///
11 | ///
12 | ///
13 | Task Execute(TaskExecutionContext context);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/build/app.config.ts:
--------------------------------------------------------------------------------
1 | /** 应用模式 */
2 |
3 | import { defineConfig } from 'vite'
4 | import useBaseConfig from './base.config'
5 |
6 | export default defineConfig(({ mode, command }) => {
7 | const config = useBaseConfig({ target: 'app', mode, command })
8 |
9 | if (mode == 'production') {
10 | config.build = {
11 | outDir: '../../WebHost/wwwroot/web',
12 | }
13 | }
14 | return config
15 | })
16 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/components/platform-select/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Annotations/TransactionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Data;
3 |
4 | namespace Mkh.Data.Abstractions.Annotations;
5 |
6 | ///
7 | /// 特性事务
8 | ///
9 | [AttributeUsage(AttributeTargets.Method)]
10 | public class TransactionAttribute : Attribute
11 | {
12 | ///
13 | /// 事务隔离级别
14 | ///
15 | public IsolationLevel? IsolationLevel { get; set; }
16 | }
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Entities/ITenant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Data.Abstractions.Entities;
4 |
5 | ///
6 | /// 实体租户扩展
7 | ///
8 | public interface ITenant
9 | {
10 | ///
11 | /// 租户编号
12 | ///
13 | TKey TenantId { get; set; }
14 | }
15 |
16 | ///
17 | /// 实体租户扩展
18 | ///
19 | public interface ITenant : ITenant
20 | {
21 |
22 | }
--------------------------------------------------------------------------------
/test/02_Data/Data.Web.Test/Data.Web.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Query/QuerySortDto.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Data.Abstractions.Pagination;
2 |
3 | namespace Mkh.Data.Abstractions.Query;
4 |
5 | ///
6 | /// 查询排序
7 | ///
8 | public class QuerySortDto
9 | {
10 | ///
11 | /// 字段
12 | ///
13 | public string Field { get; set; }
14 |
15 | ///
16 | /// 排序类型
17 | ///
18 | public SortType Type { get; set; }
19 | }
--------------------------------------------------------------------------------
/test/01_Utils/Utils.Tests/Product.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Utils.Tests
5 | {
6 | public class Product
7 | {
8 | public int Id { get; set; }
9 |
10 | public string Title { get; set; }
11 |
12 | public decimal Price { get; set; }
13 |
14 | public IList Tags { get; set; }
15 |
16 | public DateTime PublishDate { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Cache/Cache.Core/Cache.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH 缓存内存中缓存实现库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Schema/TableSchema.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Mkh.Data.Abstractions.Schema;
4 |
5 | ///
6 | /// 表结构
7 | ///
8 | public class TableSchema
9 | {
10 | ///
11 | /// 表名称
12 | ///
13 | public string Name { get; set; }
14 |
15 | ///
16 | /// 列集合
17 | ///
18 | public List Columns { get; set; }
19 | }
--------------------------------------------------------------------------------
/src/MessageQueue/MessageQueue.RabbitMQ/MessageQueue.RabbitMQ.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH RabbitMQ库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Module/Module.Web/IModuleMvcOptionsConfigurator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 |
3 | namespace Mkh.Module.Web;
4 |
5 | ///
6 | /// 模块MVC配置项配置器接口
7 | /// 当模块中有需要配置MVC功能时,可通过实现该接口来配置
8 | ///
9 | public interface IModuleMvcOptionsConfigurator
10 | {
11 | ///
12 | /// 配置MVC
13 | ///
14 | ///
15 | void Configure(MvcOptions mvcOptions);
16 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.Core/Infrastructure/AdminException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Mkh.Utils.Exceptions;
3 |
4 | namespace Mkh.Mod.Admin.Core.Infrastructure;
5 |
6 | public class AdminException : MkhBusinessException
7 | {
8 | public AdminException(Enum errorCode) : base("Admin", errorCode)
9 | {
10 | }
11 |
12 | public static void Throw(AdminErrorCode errorCode)
13 | {
14 | throw new AdminException(errorCode);
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/Auth.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH认证与授权抽象库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/IPermissionResolver.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Mkh.Auth.Abstractions;
4 |
5 | ///
6 | /// 权限解析器
7 | ///
8 | public interface IPermissionResolver
9 | {
10 | ///
11 | /// 获取指定模块的权限列表
12 | ///
13 | /// 模块编码
14 | ///
15 | List GetPermissions(string moduleCode);
16 | }
--------------------------------------------------------------------------------
/src/Cache/Cache.Abstractions/Cache.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17MKH 缓存抽象库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/src/api/dict/index.ts:
--------------------------------------------------------------------------------
1 | import { crud } from 'mkh-ui'
2 | import http from '../http'
3 |
4 | const urls = {
5 | SELECT: 'Dict/Select',
6 | TREE: 'Dict/Tree',
7 | CASCADER: 'Dict/Cascader',
8 | }
9 |
10 | export default {
11 | ...crud(http, 'Dict'),
12 | select: (params) => http.get(urls.SELECT, params),
13 | tree: (params) => http.get(urls.TREE, params),
14 | cascader: (params) => http.get(urls.CASCADER, params),
15 | }
16 |
--------------------------------------------------------------------------------
/src/Data/Data.Abstractions/Schema/DatabaseSchema.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Mkh.Data.Abstractions.Schema;
4 |
5 | ///
6 | /// 数据库结构
7 | ///
8 | public class DatabaseSchema
9 | {
10 | ///
11 | /// 数据库名称
12 | ///
13 | public string Name { get; set; }
14 |
15 | ///
16 | /// 表集合
17 | ///
18 | public List Tables { get; set; }
19 | }
--------------------------------------------------------------------------------
/src/Utils/Utils/Exceptions/MkhSystemException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Mkh.Utils.Exceptions;
4 |
5 | ///
6 | /// 由MKH系统抛出的系统异常
7 | ///
8 | public abstract class MkhSystemException : Exception
9 | {
10 | public string Module { get; }
11 |
12 | public string Code { get; }
13 |
14 | protected MkhSystemException(string module, string code)
15 | {
16 | Module = module;
17 | Code = code;
18 | }
19 | }
--------------------------------------------------------------------------------
/modules/00_Admin/Admin.UI/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "es2021": true,
6 | "node": true
7 | },
8 | "extends": [
9 | "plugin:vue/vue3-recommended",
10 | "eslint:recommended",
11 | "@vue/typescript/recommended",
12 | "@vue/prettier",
13 | "@vue/prettier/@typescript-eslint"
14 | ],
15 | "parserOptions": {
16 | "ecmaVersion": 2021
17 | },
18 | "plugins": [],
19 | "rules": {}
20 | }
--------------------------------------------------------------------------------
/src/Module/Module.Core/Module.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17mkh模块化核心库
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/01_Utils/Utils.Tests/Models/ResultModelTests.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 | using Mkh;
3 | using Xunit;
4 |
5 | namespace Utils.Tests.Models
6 | {
7 | public class ResultModelTests
8 | {
9 | [Fact]
10 | public void SuccessTest()
11 | {
12 | var result = ResultModel.Success();
13 | var json = JsonSerializer.Serialize(result);
14 |
15 | Assert.NotNull(json);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Auth/Auth.Abstractions/IPermissionValidateHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | namespace Mkh.Auth.Abstractions;
5 |
6 | ///
7 | /// 权限验证处理接口
8 | ///
9 | public interface IPermissionValidateHandler
10 | {
11 | ///
12 | /// 验证
13 | ///
14 | ///
15 | Task Validate(IDictionary routeValues, HttpMethod httpMethod);
16 | }
--------------------------------------------------------------------------------
/src/Utils/Utils/Models/OptionCollectionResultModel.cs:
--------------------------------------------------------------------------------
1 | using Mkh.Utils.Abstracts;
2 |
3 | // ReSharper disable once CheckNamespace
4 | namespace Mkh;
5 |
6 | ///
7 | /// 选项集合模型
8 | ///
9 | public class OptionCollectionResultModel : CollectionAbstract>
10 | {
11 | }
12 |
13 | ///
14 | /// 选项集合模型
15 | ///
16 | public class OptionCollectionResultModel : OptionCollectionResultModel