├── .gitattributes
├── test
├── Host
│ └── Host.Generic.Tests
│ │ ├── config
│ │ ├── cache.Development.json
│ │ ├── cache.json
│ │ └── logging.Development.json
│ │ ├── Properties
│ │ └── launchSettings.json
│ │ └── Program.cs
├── Pdf
│ └── Pdf.iText.Tests
│ │ ├── pdfs
│ │ ├── pH水质自动分析仪技术要求.pdf
│ │ └── 再生铜、铝、铅、锌工业污染物排放标准.pdf
│ │ └── PdfHandlerTest.cs
├── Utils
│ └── Utils.Core.Tests
│ │ ├── Log
│ │ ├── ILog.cs
│ │ └── TextLog.cs
│ │ ├── BaseTest.cs
│ │ └── ServiceCollectionExtensionsTest.cs
└── Data
│ ├── Data.Common
│ ├── Repository
│ │ ├── ICategoryRepository.cs
│ │ ├── CategoryRepository.cs
│ │ └── IArticleRepository.cs
│ ├── BlogDbContext.cs
│ ├── Domain
│ │ └── CategoryEntity.cs
│ ├── Data.Common.csproj
│ └── LoginInfo.cs
│ ├── Data.SQLite.Tests
│ └── config
│ │ └── db.json
│ ├── Data.SqlServer.Tests
│ └── config
│ │ └── db.json
│ ├── Data.MySql.Tests
│ └── config
│ │ └── db.json
│ └── Data.PostgreSQL.Tests
│ └── config
│ └── db.json
├── src
├── Admin
│ ├── UI
│ │ └── module-admin
│ │ │ ├── .browserslistrc
│ │ │ ├── src
│ │ │ ├── store
│ │ │ │ └── index.js
│ │ │ ├── main.js
│ │ │ ├── views
│ │ │ │ ├── cache
│ │ │ │ │ └── index
│ │ │ │ │ │ ├── cols.js
│ │ │ │ │ │ └── page.js
│ │ │ │ ├── mime
│ │ │ │ │ └── index
│ │ │ │ │ │ └── cols.js
│ │ │ │ ├── home
│ │ │ │ │ ├── page.js
│ │ │ │ │ └── index.vue
│ │ │ │ ├── icon
│ │ │ │ │ └── page.js
│ │ │ │ ├── module
│ │ │ │ │ ├── index
│ │ │ │ │ │ └── page.js
│ │ │ │ │ └── components
│ │ │ │ │ │ └── permission-list
│ │ │ │ │ │ └── cols.js
│ │ │ │ ├── config
│ │ │ │ │ ├── page.js
│ │ │ │ │ └── library
│ │ │ │ │ │ └── form-mixins.js
│ │ │ │ ├── log
│ │ │ │ │ └── login-log
│ │ │ │ │ │ ├── page.js
│ │ │ │ │ │ └── cols.js
│ │ │ │ └── menu
│ │ │ │ │ └── index
│ │ │ │ │ └── cols.js
│ │ │ ├── api
│ │ │ │ ├── components
│ │ │ │ │ ├── mime.js
│ │ │ │ │ ├── cache.js
│ │ │ │ │ ├── module.js
│ │ │ │ │ ├── log.js
│ │ │ │ │ ├── permission.js
│ │ │ │ │ ├── tool.js
│ │ │ │ │ ├── auditInfo.js
│ │ │ │ │ └── config.js
│ │ │ │ └── index.js
│ │ │ ├── module.js
│ │ │ ├── components
│ │ │ │ ├── role-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── module-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── loginmode-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── index.js
│ │ │ │ ├── platform-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── enum-select
│ │ │ │ │ └── index.vue
│ │ │ │ ├── enum-radio
│ │ │ │ │ └── index.vue
│ │ │ │ └── enum-checkbox
│ │ │ │ │ └── index.vue
│ │ │ ├── routes
│ │ │ │ └── index.js
│ │ │ └── config
│ │ │ │ └── index.js
│ │ │ ├── script
│ │ │ ├── npm_update.ps1
│ │ │ ├── npm_install.ps1
│ │ │ └── npm_publish.ps1
│ │ │ ├── postcss.config.js
│ │ │ ├── .prettierrc
│ │ │ ├── babel.config.js
│ │ │ ├── .vscode
│ │ │ └── settings.json
│ │ │ └── .eslintrc.js
│ ├── WebHost
│ │ ├── _modules
│ │ │ └── 00_Admin
│ │ │ │ ├── _module.json
│ │ │ │ └── InitData
│ │ │ │ ├── AccountRole.json
│ │ │ │ ├── AccountConfig.json
│ │ │ │ ├── Module.json
│ │ │ │ ├── Role.json
│ │ │ │ └── Account.json
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ └── launchSettings.json
│ ├── Library
│ │ ├── Domain
│ │ │ ├── Module
│ │ │ │ └── ModuleEntity.Extend.cs
│ │ │ ├── Mime
│ │ │ │ ├── Models
│ │ │ │ │ └── MimeQueryModel.cs
│ │ │ │ └── MimeEntity.cs
│ │ │ ├── Tenant
│ │ │ │ ├── ITenantRepository.cs
│ │ │ │ └── TenantEntity.cs
│ │ │ ├── Role
│ │ │ │ ├── Models
│ │ │ │ │ └── RoleQueryModel.cs
│ │ │ │ └── RoleEntity.cs
│ │ │ ├── Config
│ │ │ │ ├── ConfigEntity.Extend.cs
│ │ │ │ ├── Models
│ │ │ │ │ └── ConfigQueryModel.cs
│ │ │ │ ├── IConfigRepository.cs
│ │ │ │ └── ConfigEntity.cs
│ │ │ ├── AuditInfo
│ │ │ │ └── AuditInfoEntity.Extend.cs
│ │ │ ├── LoginLog
│ │ │ │ ├── LoginLogEntity.Extend.cs
│ │ │ │ └── ILoginLogRepository.cs
│ │ │ ├── FileOwner
│ │ │ │ ├── IFileOwnerRepository.cs
│ │ │ │ └── FileOwnerEntity.cs
│ │ │ ├── File
│ │ │ │ ├── FileEntity.Extend.cs
│ │ │ │ └── Models
│ │ │ │ │ └── FileQueryModel.cs
│ │ │ ├── Menu
│ │ │ │ ├── Models
│ │ │ │ │ └── MenuQueryModel.cs
│ │ │ │ ├── MenuEntity.Extend.cs
│ │ │ │ └── MenuType.cs
│ │ │ ├── AccountConfig
│ │ │ │ └── IAccountConfigRepository.cs
│ │ │ ├── RoleMenu
│ │ │ │ └── RoleMenuEntity.cs
│ │ │ ├── AccountRole
│ │ │ │ └── AccountRoleEntity.cs
│ │ │ ├── RolePage
│ │ │ │ └── RolePageEntity.cs
│ │ │ ├── RolePermission
│ │ │ │ └── RolePermissionEntity.cs
│ │ │ └── RoleButton
│ │ │ │ └── RoleButtonEntity.cs
│ │ ├── Application
│ │ │ ├── ModuleService
│ │ │ │ └── ViewModels
│ │ │ │ │ ├── ModuleSyncModel.cs
│ │ │ │ │ └── ModuleOptionsUpdateModel.cs
│ │ │ ├── MimeService
│ │ │ │ └── ViewModels
│ │ │ │ │ ├── MimeUpdateModel.cs
│ │ │ │ │ └── MimeAddModel.cs
│ │ │ ├── RoleService
│ │ │ │ ├── ViewModels
│ │ │ │ │ ├── RoleUpdateModel.cs
│ │ │ │ │ ├── RoleAddModel.cs
│ │ │ │ │ ├── RoleMenuBindModel.cs
│ │ │ │ │ └── RolePermissionBindModel.cs
│ │ │ │ └── _MapperConfig.cs
│ │ │ ├── MenuService
│ │ │ │ ├── ViewModels
│ │ │ │ │ └── MenuUpdateModel.cs
│ │ │ │ └── _MapperConfig.cs
│ │ │ ├── ConfigService
│ │ │ │ └── ViewModels
│ │ │ │ │ └── ConfigUpdateModel.cs
│ │ │ ├── ToolService
│ │ │ │ └── IToolService.cs
│ │ │ ├── AccountService
│ │ │ │ └── ViewModels
│ │ │ │ │ ├── AccountSkinUpdateModel.cs
│ │ │ │ │ └── AccountRoleBindModel.cs
│ │ │ ├── AuthService
│ │ │ │ ├── LoginHandler
│ │ │ │ │ └── DefaultCustomLoginHandler.cs
│ │ │ │ └── Defaults
│ │ │ │ │ └── DefaultPhoneVerifyCodeProvider.cs
│ │ │ └── CacheService
│ │ │ │ └── ICacheService.cs
│ │ ├── Infrastructure
│ │ │ ├── Repositories
│ │ │ │ ├── PostgreSQL
│ │ │ │ │ ├── Sql
│ │ │ │ │ │ └── AuditInfoSql.cs
│ │ │ │ │ ├── FileRepository.cs
│ │ │ │ │ ├── MimeRepository.cs
│ │ │ │ │ ├── ConfigRepository.cs
│ │ │ │ │ ├── MenuRepository.cs
│ │ │ │ │ ├── ModuleRepository.cs
│ │ │ │ │ ├── RoleRepository.cs
│ │ │ │ │ ├── TenantRepository.cs
│ │ │ │ │ ├── AccountRepository.cs
│ │ │ │ │ ├── LoginLogRepository.cs
│ │ │ │ │ ├── RoleMenuRepository.cs
│ │ │ │ │ ├── RolePageRepository.cs
│ │ │ │ │ ├── FileOwnerRepository.cs
│ │ │ │ │ ├── RoleButtonRepository.cs
│ │ │ │ │ ├── AccountRoleRepository.cs
│ │ │ │ │ ├── AccountConfigRepository.cs
│ │ │ │ │ ├── RolePermissionRepository.cs
│ │ │ │ │ └── AccountAuthInfoRepository.cs
│ │ │ │ ├── MySql
│ │ │ │ │ ├── FileRepository.cs
│ │ │ │ │ ├── MimeRepository.cs
│ │ │ │ │ ├── ConfigRepository.cs
│ │ │ │ │ ├── MenuRepository.cs
│ │ │ │ │ ├── ModuleRepository.cs
│ │ │ │ │ ├── RoleRepository.cs
│ │ │ │ │ ├── TenantRepository.cs
│ │ │ │ │ ├── AccountRepository.cs
│ │ │ │ │ ├── LoginLogRepository.cs
│ │ │ │ │ ├── RoleMenuRepository.cs
│ │ │ │ │ ├── RolePageRepository.cs
│ │ │ │ │ ├── FileOwnerRepository.cs
│ │ │ │ │ ├── RoleButtonRepository.cs
│ │ │ │ │ ├── AccountRoleRepository.cs
│ │ │ │ │ ├── AccountConfigRepository.cs
│ │ │ │ │ ├── RolePermissionRepository.cs
│ │ │ │ │ ├── AccountAuthInfoRepository.cs
│ │ │ │ │ └── Sql
│ │ │ │ │ │ └── AuditInfoSql.cs
│ │ │ │ ├── SQLite
│ │ │ │ │ ├── FileRepository.cs
│ │ │ │ │ ├── MimeRepository.cs
│ │ │ │ │ ├── MenuRepository.cs
│ │ │ │ │ ├── RoleRepository.cs
│ │ │ │ │ ├── ConfigRepository.cs
│ │ │ │ │ ├── ModuleRepository.cs
│ │ │ │ │ ├── TenantRepository.cs
│ │ │ │ │ ├── AccountRepository.cs
│ │ │ │ │ ├── LoginLogRepository.cs
│ │ │ │ │ ├── RoleMenuRepository.cs
│ │ │ │ │ ├── RolePageRepository.cs
│ │ │ │ │ ├── FileOwnerRepository.cs
│ │ │ │ │ ├── RoleButtonRepository.cs
│ │ │ │ │ ├── AccountConfigRepository.cs
│ │ │ │ │ ├── AccountRoleRepository.cs
│ │ │ │ │ ├── RolePermissionRepository.cs
│ │ │ │ │ └── AccountAuthInfoRepository.cs
│ │ │ │ ├── AdminDbContext.cs
│ │ │ │ └── SqlServer
│ │ │ │ │ ├── TenantRepository.cs
│ │ │ │ │ ├── Sql
│ │ │ │ │ └── AuditInfoSql.cs
│ │ │ │ │ ├── ConfigRepository.cs
│ │ │ │ │ ├── FileOwnerRepository.cs
│ │ │ │ │ └── AccountConfigRepository.cs
│ │ │ ├── AdminConfig.cs
│ │ │ ├── ModuleServicesConfigurator.cs
│ │ │ └── AccountPermissionResolver
│ │ │ │ └── MenuComparer.cs
│ │ └── Quartz
│ │ │ ├── Quartz.csproj
│ │ │ └── ModuleApiRequestCountSyncTask.cs
│ └── Web
│ │ ├── ModuleController.cs
│ │ ├── Validators
│ │ ├── AccountUpdateValidator.cs
│ │ └── AccountAddValidator.cs
│ │ └── Core
│ │ └── DefaultLoginClaimsExtendProvider.cs
└── Framework
│ ├── Host
│ ├── Host.Api
│ │ ├── Class1.cs
│ │ └── Host.Api.csproj
│ ├── Host.Web
│ │ ├── IStartLogoProvider.cs
│ │ └── Middleware
│ │ │ └── ExceptionHandleMiddlewareExtensions.cs
│ └── Host.Electron
│ │ └── Host.Electron.csproj
│ ├── Config
│ ├── Config.Abstractions
│ │ ├── IConfig.cs
│ │ ├── ConfigCollection.cs
│ │ ├── IConfigCollection.cs
│ │ ├── ConfigType.cs
│ │ ├── IConfigChangeEvent.cs
│ │ ├── Config.Abstractions.csproj
│ │ └── Impl
│ │ │ └── SystemConfig.cs
│ ├── Config.Redis
│ │ ├── Config.Redis.csproj
│ │ └── ServiceCollectionExtensions.cs
│ └── Config.Core
│ │ └── Config.Core.csproj
│ ├── Pdf
│ ├── Pdf.Abstractions
│ │ ├── PdfProvider.cs
│ │ ├── PdfConfig.cs
│ │ ├── IPdfHandler.cs
│ │ └── Pdf.Abstractions.csproj
│ ├── Pdf.Integration
│ │ └── Pdf.Integration.csproj
│ └── Pdf.iText
│ │ └── Pdf.iText.csproj
│ ├── Data
│ ├── Core
│ │ ├── Data.Abstractions
│ │ │ ├── Entities
│ │ │ │ ├── IEntity.cs
│ │ │ │ ├── IColumnDescriptorCollection.cs
│ │ │ │ ├── ITenant.cs
│ │ │ │ └── IEntitySqlBuilder.cs
│ │ │ ├── Enums
│ │ │ │ ├── JoinType.cs
│ │ │ │ └── SortType.cs
│ │ │ ├── Attributes
│ │ │ │ ├── KeyAttribute.cs
│ │ │ │ ├── MaxAttribute.cs
│ │ │ │ ├── NullableAttribute.cs
│ │ │ │ ├── PrefixIgnoreAttribute.cs
│ │ │ │ ├── IgnoreAttribute.cs
│ │ │ │ ├── LengthAttribute.cs
│ │ │ │ ├── TableAttribute.cs
│ │ │ │ └── PrecisionAttribute.cs
│ │ │ ├── SqlQueryable
│ │ │ │ └── GroupByQueryable
│ │ │ │ │ └── INetSqlGrouping.cs
│ │ │ ├── IQueryParameters.cs
│ │ │ ├── IUnitOfWork.cs
│ │ │ ├── Pagination
│ │ │ │ └── Sort.cs
│ │ │ └── IDatabaseCreateEvents.cs
│ │ └── Data.Core
│ │ │ ├── DbConstants.cs
│ │ │ ├── Entities
│ │ │ ├── ColumnDescriptorCollection.cs
│ │ │ └── Entity.cs
│ │ │ ├── SqlQueryable
│ │ │ └── Internal
│ │ │ │ └── GroupByJoinDescriptor.cs
│ │ │ └── Data.Core.csproj
│ ├── Extend
│ │ └── Data.Query
│ │ │ ├── QuerySortModel.cs
│ │ │ ├── QueryPagingModel.cs
│ │ │ └── Data.Query.csproj
│ └── Db
│ │ ├── Data.SQLite
│ │ ├── GuidTypeHandler.cs
│ │ └── Data.SQLite.csproj
│ │ ├── Data.PostgreSQL
│ │ └── Data.PostgreSQL.csproj
│ │ ├── Data.SqlServer
│ │ └── Data.SqlServer.csproj
│ │ └── Data.MySql
│ │ └── Data.MySql.csproj
│ ├── Quartz
│ ├── Quartz.Abstractions
│ │ ├── IQuartzModuleCollection.cs
│ │ ├── QuartzSerializerType.cs
│ │ ├── TaskExecutionContext.cs
│ │ ├── QuartzTaskDescriptor.cs
│ │ ├── ITask.cs
│ │ ├── QuartzProvider.cs
│ │ ├── ITaskExecutionContext.cs
│ │ ├── QuartzConfigChangedEvent.cs
│ │ └── QuartzModuleDescriptor.cs
│ └── Quartz.Core
│ │ ├── QuartzModuleCollection.cs
│ │ └── JobFactory.cs
│ ├── Utils
│ ├── Utils.Core
│ │ ├── Attributes
│ │ │ └── IgnorePropertyAttribute.cs
│ │ ├── Models
│ │ │ ├── SortUpdateModel.cs
│ │ │ ├── CoordinateModel.cs
│ │ │ └── SortOptionModel.cs
│ │ ├── Interfaces
│ │ │ └── IAppShutdownHandler.cs
│ │ ├── Enums
│ │ │ ├── Sex.cs
│ │ │ ├── Whether.cs
│ │ │ ├── FileAccessMode.cs
│ │ │ └── HttpMethod.cs
│ │ ├── Result
│ │ │ ├── ExcelExportResultModel.cs
│ │ │ ├── ChartDataResultModel.cs
│ │ │ ├── QueryResultModel.cs
│ │ │ └── IResultModel.cs
│ │ ├── Files
│ │ │ └── FileSizeUnit.cs
│ │ └── Extensions
│ │ │ ├── ArrayExtensions.cs
│ │ │ └── GuidExtensions.cs
│ └── Utils.Mvc
│ │ ├── Extensions
│ │ └── HttpRequestExtensions.cs
│ │ └── Utils.Mvc.csproj
│ ├── OSS
│ ├── OSS.Qiniu.SDK
│ │ ├── Storage
│ │ │ ├── UploadProgressHandler.cs
│ │ │ ├── QiniuException.cs
│ │ │ └── UploadController.cs
│ │ ├── OSS.Qiniu.SDK.csproj
│ │ ├── QiniuCSharpSDK.cs
│ │ └── Util
│ │ │ └── Mac.cs
│ ├── OSS.Minio
│ │ └── OSS.Minio.csproj
│ ├── OSS.Aliyun
│ │ └── OSS.Aliyun.csproj
│ ├── OSS.Abstractions
│ │ ├── OSS.Abstractions.csproj
│ │ ├── OSSProvider.cs
│ │ ├── AliyunConfig.cs
│ │ └── OSSConfig.cs
│ ├── OSS.Integration
│ │ └── OSS.Integration.csproj
│ ├── OSS.Qiniu
│ │ └── OSS.Qiniu.csproj
│ └── OSS.Local
│ │ └── OSS.Local.csproj
│ ├── Auth
│ ├── Auth.Web
│ │ ├── PermissionTreeModel.cs
│ │ ├── Attributes
│ │ │ ├── CommonAttribute.cs
│ │ │ └── DisableAuditingAttribute.cs
│ │ ├── ApiControllerAbstract.cs
│ │ ├── DefaultTenantResolver.cs
│ │ └── IAuditingHandler.cs
│ ├── Auth.Abstractions
│ │ ├── ISingleAccountLoginHandler.cs
│ │ ├── LoginModels
│ │ │ ├── CustomLoginModel.cs
│ │ │ ├── VerifyCodeModel.cs
│ │ │ ├── PhoneVerifyCodeSendModel.cs
│ │ │ ├── EmailLoginModel.cs
│ │ │ └── UserNameLoginModel.cs
│ │ ├── ITenantResolver.cs
│ │ ├── Providers
│ │ │ └── ILoginLogProvider.cs
│ │ ├── IPermissionValidateHandler.cs
│ │ ├── LoginHandlers
│ │ │ ├── IEmailLoginHandler.cs
│ │ │ ├── IPhoneLoginHandler.cs
│ │ │ ├── ICustomLoginHandler.cs
│ │ │ ├── IUserNameLoginHandler.cs
│ │ │ └── IUserNameOrEmailLoginHandler.cs
│ │ ├── ILoginClaimsExtendProvider.cs
│ │ ├── ILoginHandler.cs
│ │ ├── ILoginInfoDetailsBuilder.cs
│ │ ├── Auth.Abstractions.csproj
│ │ ├── PasswordHandler
│ │ │ └── IPasswordHandler.cs
│ │ └── AccountType.cs
│ └── Auth.Jwt
│ │ └── JwtTokenModel.cs
│ ├── Module
│ ├── Module.Abstractions
│ │ ├── IModuleCollection.cs
│ │ ├── IModuleServicesConfigurator.cs
│ │ ├── IModuleAssemblyDescriptor.cs
│ │ └── ModuleEnumDescriptor.cs
│ ├── Module.GenericHost
│ │ ├── ModuleAssemblyDescriptor.cs
│ │ └── Module.GenericHost.csproj
│ └── Module.AspNetCore
│ │ ├── ModuleAssemblyDescriptor.cs
│ │ └── Module.AspNetCore.csproj
│ ├── Excel
│ ├── Excel.Abstractions
│ │ ├── ExcelProvider.cs
│ │ ├── ExcelConfig.cs
│ │ ├── IExcelHandler.cs
│ │ ├── Excel.Abstractions.csproj
│ │ └── IExcelExportHandler.cs
│ ├── Excel.NPOI
│ │ └── Excel.NPOI.csproj
│ ├── Excel.Aspose
│ │ └── Excel.Aspose.csproj
│ ├── Excel.EPPlus
│ │ ├── EPPlusExcelHandler.cs
│ │ └── Excel.EPPlus.csproj
│ └── Excel.Integration
│ │ └── Excel.Integration.csproj
│ ├── Mapper
│ └── Mapper.AutoMapper
│ │ ├── IMapperConfig.cs
│ │ └── MapperConfigurationExpression.cs
│ ├── MQ
│ └── MQ.RabbitMQ
│ │ ├── DefaultExchange.cs
│ │ └── Consumer.cs
│ ├── Cache
│ ├── Cache.Abstractions
│ │ ├── CacheProvider.cs
│ │ ├── CacheKeyDescriptor.cs
│ │ └── Cache.Abstractions.csproj
│ └── Cache.Integration
│ │ └── Cache.Integration.csproj
│ ├── Validation
│ └── Validation.Abstractions
│ │ ├── IValidateResultFormatHandler.cs
│ │ └── Validation.Abstractions.csproj
│ └── Logging
│ ├── Logging.Serilog
│ └── HostBuilderExtensions.cs
│ └── Logging.Serilog.GenericHost
│ └── GenericHostBuilderExtensions.cs
├── img
├── qq.jpg
├── airpay.jpg
├── code.png
├── logo.png
├── wechat.jpg
├── wechat_group.png
├── 20201108235810.png
├── 20201108235849.png
├── 20201108235914.png
└── 20201108235933.png
└── docs
└── NetModular生态.xmind
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sql linguist-language=C#
2 |
--------------------------------------------------------------------------------
/test/Host/Host.Generic.Tests/config/cache.Development.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 |
--------------------------------------------------------------------------------
/img/qq.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/qq.jpg
--------------------------------------------------------------------------------
/img/airpay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/airpay.jpg
--------------------------------------------------------------------------------
/img/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/code.png
--------------------------------------------------------------------------------
/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/logo.png
--------------------------------------------------------------------------------
/img/wechat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/wechat.jpg
--------------------------------------------------------------------------------
/img/wechat_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/wechat_group.png
--------------------------------------------------------------------------------
/docs/NetModular生态.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/docs/NetModular生态.xmind
--------------------------------------------------------------------------------
/img/20201108235810.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/20201108235810.png
--------------------------------------------------------------------------------
/img/20201108235849.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/20201108235849.png
--------------------------------------------------------------------------------
/img/20201108235914.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/20201108235914.png
--------------------------------------------------------------------------------
/img/20201108235933.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/img/20201108235933.png
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/store/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | namespaced: true,
3 | state: {}
4 | }
5 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/script/npm_update.ps1:
--------------------------------------------------------------------------------
1 | cd ../
2 | npm --registry https://registry.npmjs.org/ update
3 | pause
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/script/npm_install.ps1:
--------------------------------------------------------------------------------
1 | cd ../
2 | npm --registry https://registry.npmjs.org/ install
3 | pause
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/script/npm_publish.ps1:
--------------------------------------------------------------------------------
1 | cd ../
2 | npm --registry https://registry.npmjs.org/ publish
3 | pause
--------------------------------------------------------------------------------
/src/Framework/Host/Host.Api/Class1.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Host.Api
2 | {
3 | public class Class1
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "semi": false,
4 | "singleQuote": true,
5 | "printWidth": 200
6 | }
7 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/main.js:
--------------------------------------------------------------------------------
1 | import WebHost from './index'
2 | import config from './config'
3 |
4 | // 启动
5 | WebHost.start(config)
6 |
--------------------------------------------------------------------------------
/test/Pdf/Pdf.iText.Tests/pdfs/pH水质自动分析仪技术要求.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/test/Pdf/Pdf.iText.Tests/pdfs/pH水质自动分析仪技术要求.pdf
--------------------------------------------------------------------------------
/test/Host/Host.Generic.Tests/config/cache.json:
--------------------------------------------------------------------------------
1 | {
2 | // 0、MemoryCache 1、Redis
3 | "Mode": 0,
4 | "Redis": {
5 | "ConnectionString": "wsl"
6 | }
7 | }
--------------------------------------------------------------------------------
/test/Pdf/Pdf.iText.Tests/pdfs/再生铜、铝、铅、锌工业污染物排放标准.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iamoldli/NetModular/HEAD/test/Pdf/Pdf.iText.Tests/pdfs/再生铜、铝、铅、锌工业污染物排放标准.pdf
--------------------------------------------------------------------------------
/src/Admin/WebHost/_modules/00_Admin/_module.json:
--------------------------------------------------------------------------------
1 | {"Id": "00","Name":"权限管理","Code":"Admin","Icon":"permission","Version":"9.0.6","Description":"权限管理模块用于身份认证以及授权等功能"}
2 |
--------------------------------------------------------------------------------
/test/Utils/Utils.Core.Tests/Log/ILog.cs:
--------------------------------------------------------------------------------
1 | namespace Utils.Core.Tests.Log
2 | {
3 | public interface ILog
4 | {
5 | string Debug();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Module/ModuleEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Module.Admin.Domain.Module
2 | {
3 | public partial class ModuleEntity
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/src/Admin/WebHost/_modules/00_Admin/InitData/AccountRole.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "AccountId": "39F08CFD-8E0D-771B-A2F3-2639A62CA2FA",
4 | "RoleId": "39F08CFD-8DD0-BB54-4544-C2DC43C6CA38"
5 | }
6 | ]
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/views/cache/index/cols.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | name: 'name',
4 | label: '键名'
5 | },
6 | {
7 | name: 'desc',
8 | label: '说明'
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | [
4 | '@vue/cli-plugin-babel/preset',
5 | {
6 | useBuiltIns: 'entry'
7 | }
8 | ]
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/Admin/WebHost/_modules/00_Admin/InitData/AccountConfig.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "AccountId": "39F08CFD-8E0D-771B-A2F3-2639A62CA2FA",
4 | "Skin": "pretty",
5 | "Theme": "default",
6 | "FontSize": "small"
7 | }
8 | ]
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/IConfig.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Config.Abstractions
2 | {
3 | ///
4 | /// 配置接口,所有配置类都要继承该接口
5 | ///
6 | public interface IConfig
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Framework/Pdf/Pdf.Abstractions/PdfProvider.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Pdf.Abstractions
2 | {
3 | ///
4 | /// PDF提供器
5 | ///
6 | public enum PdfProvider
7 | {
8 | iText
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Entities/IEntity.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace NetModular.Lib.Data.Abstractions.Entities
3 | {
4 | ///
5 | /// 实体
6 | ///
7 | public interface IEntity
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/components/mime.js:
--------------------------------------------------------------------------------
1 | import module from '../../module'
2 |
3 | export default name => {
4 | const root = `${module.code}/${name}/`
5 | const crud = $http.crud(root)
6 |
7 | return {
8 | ...crud
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/module.js:
--------------------------------------------------------------------------------
1 | /** 模块信息 */
2 | const pack = require('../package.json')
3 |
4 | export default {
5 | id: pack.id,
6 | name: pack.title,
7 | code: pack.code,
8 | version: pack.version,
9 | description: pack.description
10 | }
11 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/IQuartzModuleCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace NetModular.Lib.Quartz.Abstractions
4 | {
5 | public interface IQuartzModuleCollection : IList
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/test/Host/Host.Generic.Tests/config/logging.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Serilog": {
3 | "MinimumLevel": {
4 | "Default": "Debug",
5 | "Override": {
6 | "Microsoft": "Debug",
7 | "System": "Debug"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/test/Host/Host.Generic.Tests/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Host.Generic.Tests": {
4 | "commandName": "Project",
5 | "environmentVariables": {
6 | "DOTNET_ENVIRONMENT": "Development"
7 | }
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Mime/Models/MimeQueryModel.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Query;
2 |
3 | namespace NetModular.Module.Admin.Domain.Mime.Models
4 | {
5 | public class MimeQueryModel : QueryModel
6 | {
7 | public string Ext { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/Data/Data.Common/Repository/ICategoryRepository.cs:
--------------------------------------------------------------------------------
1 | using Data.Common.Domain;
2 | using NetModular.Lib.Data.Abstractions;
3 |
4 | namespace Data.Common.Repository
5 | {
6 | public interface ICategoryRepository : IRepository
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/ModuleService/ViewModels/ModuleSyncModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Module.Admin.Application.ModuleService.ViewModels
2 | {
3 | ///
4 | /// 模块同步模型
5 | ///
6 | public class ModuleSyncModel
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/components/role-select/index.vue:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/src/Admin/Web/ModuleController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using NetModular.Lib.Auth.Web;
3 |
4 | namespace NetModular.Module.Admin.Web
5 | {
6 | [Area("Admin")]
7 | public abstract class ModuleController : ControllerAbstract
8 | {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/ConfigCollection.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Utils.Core.Abstracts;
2 |
3 | namespace NetModular.Lib.Config.Abstractions
4 | {
5 | public class ConfigCollection : CollectionAbstract, IConfigCollection
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/components/module-select/index.vue:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/routes/index.js:
--------------------------------------------------------------------------------
1 | import loadRoutes from 'netmodular-ui/packages/utils/load-routes'
2 | const requireComponent = require.context('../views', true, /\page.js$/)
3 | export default loadRoutes(requireComponent.keys().map(fileName => requireComponent(fileName).route))
4 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/components/loginmode-select/index.vue:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/views/mime/index/cols.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | name: 'id',
4 | label: '编号',
5 | width: 250,
6 | show: false
7 | },
8 | {
9 | name: 'ext',
10 | label: '扩展名'
11 | },
12 | {
13 | name: 'value',
14 | label: '值'
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/src/Admin/WebHost/Program.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Host.Web;
3 |
4 | namespace NetModular.Module.Admin.WebHost;
5 |
6 | public class Program
7 | {
8 | public static async Task Main(string[] args)
9 | {
10 | await new HostBuilder().RunAsync(args);
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Enums/JoinType.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Data.Abstractions.Enums
2 | {
3 | ///
4 | /// 连接类型
5 | ///
6 | public enum JoinType
7 | {
8 | UnKnown,
9 | Left,
10 | Inner,
11 | Right
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/Utils/Utils.Core.Tests/Log/TextLog.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Utils.Core.Attributes;
2 |
3 | namespace Utils.Core.Tests.Log
4 | {
5 | [Singleton]
6 | public class TextLog : ILog
7 | {
8 | public string Debug()
9 | {
10 | return "TextLog";
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Tenant/ITenantRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Domain.Tenant
4 | {
5 | ///
6 | /// 租户仓储
7 | ///
8 | public interface ITenantRepository : IRepository
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/WebHost/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WebHost": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "launchUrl": "swagger",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/IConfigCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace NetModular.Lib.Config.Abstractions
4 | {
5 | ///
6 | /// 配置集合
7 | ///
8 | public interface IConfigCollection : IList
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/QuartzSerializerType.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NetModular.Lib.Quartz.Abstractions
4 | {
5 | public enum QuartzSerializerType
6 | {
7 | [Description("JSON")]
8 | Json,
9 | [Description("XML")]
10 | Xml
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Admin/WebHost/_modules/00_Admin/InitData/Module.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Id": "39F498A8-AE7B-049F-C78A-E16941E70FC5",
4 | "Number": 0,
5 | "Name": "权限管理",
6 | "Code": "Admin",
7 | "Icon": "permission",
8 | "Version": "2.1.2",
9 | "Remarks": "权限管理模块用于身份认证以及授权等功能",
10 | "ApiRequestCount": 0
11 | }
12 | ]
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Attributes/KeyAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Attributes
4 | {
5 | ///
6 | /// 主键
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class KeyAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/Utils/Utils.Core/Attributes/IgnorePropertyAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Utils.Core.Attributes
4 | {
5 | ///
6 | /// 忽略属性
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class IgnorePropertyAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/test/Data/Data.Common/BlogDbContext.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 | using NetModular.Lib.Data.Core;
3 |
4 | namespace Data.Common
5 | {
6 | public class BlogDbContext : DbContext
7 | {
8 | public BlogDbContext(IDbContextOptions options) : base(options)
9 | {
10 |
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Attributes/MaxAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Attributes
4 | {
5 | ///
6 | /// 最大长度
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class MaxAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Role/Models/RoleQueryModel.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Query;
2 |
3 | namespace NetModular.Module.Admin.Domain.Role.Models
4 | {
5 | public class RoleQueryModel : QueryModel
6 | {
7 | ///
8 | /// 名称
9 | ///
10 | public string Name { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/.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.tslint": "explicit",
8 | "source.fixAll.eslint": "explicit"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Entities/IColumnDescriptorCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Entities
4 | {
5 | ///
6 | /// 列信息集合
7 | ///
8 | public interface IColumnDescriptorCollection : IList
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Core/QuartzModuleCollection.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Quartz.Abstractions;
2 | using NetModular.Lib.Utils.Core.Abstracts;
3 |
4 | namespace NetModular.Lib.Quartz.Core
5 | {
6 | public class QuartzModuleCollection : CollectionAbstract, IQuartzModuleCollection
7 | {
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Attributes/NullableAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Attributes
4 | {
5 | ///
6 | /// 可空的
7 | ///
8 | [AttributeUsage(AttributeTargets.Property)]
9 | public class NullableAttribute : Attribute
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/Sql/AuditInfoSql.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL.Sql
2 | {
3 | public static class AuditInfoSql
4 | {
5 | ///
6 | /// 查询最近一周访问量
7 | ///
8 | public const string QueryLatestWeekPv = "";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/views/home/page.js:
--------------------------------------------------------------------------------
1 | /** 页面信息 */
2 | const page = new (function() {
3 | this.title = '首页'
4 | this.icon = 'home'
5 | this.name = 'home'
6 | this.path = '/admin/home'
7 | this.icon = 'home'
8 | })()
9 |
10 | export const route = {
11 | page,
12 | component: () => import('./index')
13 | }
14 |
15 | export default page
16 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Qiniu.SDK/Storage/UploadProgressHandler.cs:
--------------------------------------------------------------------------------
1 | namespace Qiniu.Storage
2 | {
3 | ///
4 | /// 分片上传进度处理
5 | ///
6 | /// 已上传的字节数
7 | /// 文件总字节数
8 | public delegate void UploadProgressHandler(long uploadedBytes, long totalBytes);
9 | }
10 |
--------------------------------------------------------------------------------
/test/Host/Host.Generic.Tests/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using NetModular.Lib.Host.Generic;
4 |
5 | namespace Host.Generic.Tests
6 | {
7 | class Program
8 | {
9 | static async Task Main(string[] args)
10 | {
11 | await new HostBuilder().Run(args);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/MimeService/ViewModels/MimeUpdateModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace NetModular.Module.Admin.Application.MimeService.ViewModels
4 | {
5 | public class MimeUpdateModel : MimeAddModel
6 | {
7 | [Required(ErrorMessage = "请选择数据")]
8 | public int Id { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Core/DbConstants.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Data.Core
2 | {
3 | ///
4 | /// 数据库相关常量
5 | ///
6 | internal static class DbConstants
7 | {
8 | ///
9 | /// 租户列名称
10 | ///
11 | public const string TENANT_COLUMN_NAME = "TenantId";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/Data/Data.SQLite.Tests/config/db.json:
--------------------------------------------------------------------------------
1 | {
2 | //是否开启日志
3 | "Logging": false,
4 | //数据库类型 0、SqlServer 1、MySql 2、SQLite 3、PostgreSQL
5 | "Dialect": 2,
6 | //是否创建数据库和表
7 | "CreateDatabase": true,
8 | //模块列表
9 | "Modules": [
10 | {
11 | //模块名称
12 | "Name": "Blog",
13 | //数据库名称
14 | "Database": "Nm_Blog"
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/SqlQueryable/GroupByQueryable/INetSqlGrouping.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Data.Abstractions.SqlQueryable.GroupByQueryable
2 | {
3 | ///
4 | /// 分组查询对象
5 | ///
6 | public interface INetSqlGrouping
7 | {
8 | TKey Key { get; }
9 |
10 | long Count();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/TaskExecutionContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Quartz;
3 |
4 | namespace NetModular.Lib.Quartz.Abstractions
5 | {
6 | public class TaskExecutionContext : ITaskExecutionContext
7 | {
8 | public Guid JobId { get; set; }
9 |
10 | public IJobExecutionContext JobExecutionContext { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/PermissionTreeModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Auth.Web
2 | {
3 | ///
4 | /// 权限树模型
5 | ///
6 | public class PermissionTreeModel
7 | {
8 | public string Label { get; set; }
9 |
10 | public string Code { get; set; }
11 |
12 | public bool IsPermission { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/FileRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class FileRepository : SqlServer.FileRepository
6 | {
7 | public FileRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/MimeRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class MimeRepository : SqlServer.MimeRepository
6 | {
7 | public MimeRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/FileRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class FileRepository : SqlServer.FileRepository
6 | {
7 | public FileRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/MimeRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class MimeRepository : SqlServer.MimeRepository
6 | {
7 | public MimeRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Entities/ITenant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Entities
4 | {
5 | ///
6 | /// 租户
7 | ///
8 | public interface ITenant
9 | {
10 | ///
11 | /// 租户编号
12 | ///
13 | Guid? TenantId { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/RoleService/ViewModels/RoleUpdateModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 |
4 | namespace NetModular.Module.Admin.Application.RoleService.ViewModels
5 | {
6 | public class RoleUpdateModel : RoleAddModel
7 | {
8 | [Required(ErrorMessage = "请选择角色")]
9 | public Guid Id { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/ConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class ConfigRepository : SqlServer.ConfigRepository
6 | {
7 | public ConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/MenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class MenuRepository : SqlServer.MenuRepository
6 | {
7 | public MenuRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/ModuleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class ModuleRepository : SqlServer.ModuleRepository
6 | {
7 | public ModuleRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/RoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class RoleRepository : SqlServer.RoleRepository
6 | {
7 | public RoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/TenantRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class TenantRepository : SqlServer.TenantRepository
6 | {
7 | public TenantRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/MenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class MenuRepository : SqlServer.MenuRepository
6 | {
7 | public MenuRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/RoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class RoleRepository : SqlServer.RoleRepository
6 | {
7 | public RoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/FileRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class FileRepository : SqlServer.FileRepository
6 | {
7 | public FileRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/MimeRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class MimeRepository : SqlServer.MimeRepository
6 | {
7 | public MimeRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/ConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class ConfigRepository : SqlServer.ConfigRepository
6 | {
7 | public ConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/ModuleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class ModuleRepository : SqlServer.ModuleRepository
6 | {
7 | public ModuleRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/TenantRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class TenantRepository : SqlServer.TenantRepository
6 | {
7 | public TenantRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/Attributes/CommonAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Auth.Web.Attributes
4 | {
5 | ///
6 | /// 通用权限(只要登录即可访问,不需要授权)
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
9 | public class CommonAttribute : Attribute
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/Attributes/DisableAuditingAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Auth.Web.Attributes
4 | {
5 | ///
6 | /// 禁用审计功能
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
9 | public class DisableAuditingAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Attributes/PrefixIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Attributes
4 | {
5 | ///
6 | /// 忽略表前缀,如果设置了表前缀,附加了该特性的表不会设置表前缀
7 | ///
8 | [AttributeUsage(AttributeTargets.Class, Inherited = false)]
9 | public class PrefixIgnoreAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Config/ConfigEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions.Attributes;
2 |
3 | namespace NetModular.Module.Admin.Domain.Config
4 | {
5 | public partial class ConfigEntity
6 | {
7 | ///
8 | /// 类型名称
9 | ///
10 | [Ignore]
11 | public string TypeName => Type.ToDescription();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/AdminDbContext.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 | using NetModular.Lib.Data.Core;
3 |
4 | namespace NetModular.Module.Admin.Infrastructure.Repositories
5 | {
6 | public class AdminDbContext : DbContext
7 | {
8 | public AdminDbContext(IDbContextOptions options) : base(options)
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/AccountRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class AccountRepository : SqlServer.AccountRepository
6 | {
7 | public AccountRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/LoginLogRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class LoginLogRepository : SqlServer.LoginLogRepository
6 | {
7 | public LoginLogRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/RoleMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class RoleMenuRepository : SqlServer.RoleMenuRepository
6 | {
7 | public RoleMenuRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/RolePageRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class RolePageRepository : SqlServer.RolePageRepository
6 | {
7 | public RolePageRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/ConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class ConfigRepository : SqlServer.ConfigRepository
6 | {
7 | public ConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/MenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class MenuRepository : SqlServer.MenuRepository
6 | {
7 | public MenuRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/ModuleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class ModuleRepository : SqlServer.ModuleRepository
6 | {
7 | public ModuleRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/RoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class RoleRepository : SqlServer.RoleRepository
6 | {
7 | public RoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/TenantRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class TenantRepository : SqlServer.TenantRepository
6 | {
7 | public TenantRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/AccountRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class AccountRepository : SqlServer.AccountRepository
6 | {
7 | public AccountRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/LoginLogRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class LoginLogRepository : SqlServer.LoginLogRepository
6 | {
7 | public LoginLogRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/RoleMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class RoleMenuRepository : SqlServer.RoleMenuRepository
6 | {
7 | public RoleMenuRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/RolePageRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class RolePageRepository : SqlServer.RolePageRepository
6 | {
7 | public RolePageRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/views/icon/page.js:
--------------------------------------------------------------------------------
1 | /** 页面信息 */
2 | const page = new (function() {
3 | this.title = '图标预览'
4 | this.icon = 'icon'
5 | this.name = 'admin_icon'
6 | this.path = '/admin/icon'
7 | })()
8 |
9 | /** 路由信息 */
10 | export const route = {
11 | page,
12 | component: () => import(/* webpackChunkName: "admin.icon" */ './index')
13 | }
14 |
15 | export default page
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/FileOwnerRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class FileOwnerRepository : SqlServer.FileOwnerRepository
6 | {
7 | public FileOwnerRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/FileOwnerRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class FileOwnerRepository : SqlServer.FileOwnerRepository
6 | {
7 | public FileOwnerRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/RoleButtonRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class RoleButtonRepository : SqlServer.RoleButtonRepository
6 | {
7 | public RoleButtonRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/AccountRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class AccountRepository : SqlServer.AccountRepository
6 | {
7 | public AccountRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/LoginLogRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class LoginLogRepository : SqlServer.LoginLogRepository
6 | {
7 | public LoginLogRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/RoleMenuRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class RoleMenuRepository : SqlServer.RoleMenuRepository
6 | {
7 | public RoleMenuRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/RolePageRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class RolePageRepository : SqlServer.RolePageRepository
6 | {
7 | public RolePageRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/RoleButtonRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class RoleButtonRepository : SqlServer.RoleButtonRepository
6 | {
7 | public RoleButtonRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Attributes/IgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetModular.Lib.Data.Abstractions.Attributes
4 | {
5 | ///
6 | /// 忽略属性,不创建实体对应的表或者实体属性不在表中映射列
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, Inherited = false)]
9 | public class IgnoreAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Entities/IEntitySqlBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Data.Abstractions.Entities
2 | {
3 | ///
4 | /// 实体Sql生成器
5 | ///
6 | public interface IEntitySqlBuilder
7 | {
8 | ///
9 | /// 生成
10 | ///
11 | ///
12 | EntitySql Build();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/AccountRoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class AccountRoleRepository : SqlServer.AccountRoleRepository
6 | {
7 | public AccountRoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/FileOwnerRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class FileOwnerRepository : SqlServer.FileOwnerRepository
6 | {
7 | public FileOwnerRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Module/Module.Abstractions/IModuleCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace NetModular.Lib.Module.Abstractions
4 | {
5 | ///
6 | /// 模块集合
7 | ///
8 | public interface IModuleCollection : IList
9 | {
10 | ///
11 | /// 加载
12 | ///
13 | void Load();
14 | }
15 | }
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/AuditInfo/AuditInfoEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions.Attributes;
2 |
3 | namespace NetModular.Module.Admin.Domain.AuditInfo
4 | {
5 | public partial class AuditInfoEntity
6 | {
7 | ///
8 | /// 平台名称
9 | ///
10 | [Ignore]
11 | public string PlatformName => Platform.ToDescription();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Tenant/TenantEntity.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Core.Entities.Extend;
2 |
3 | namespace NetModular.Module.Admin.Domain.Tenant
4 | {
5 | ///
6 | /// 租户信息
7 | ///
8 | public class TenantEntity : EntityBase
9 | {
10 | ///
11 | /// 租户名称
12 | ///
13 | public string Name { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/AccountConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class AccountConfigRepository : SqlServer.AccountConfigRepository
6 | {
7 | public AccountConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/RoleButtonRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class RoleButtonRepository : SqlServer.RoleButtonRepository
6 | {
7 | public RoleButtonRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/AccountConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class AccountConfigRepository : SqlServer.AccountConfigRepository
6 | {
7 | public AccountConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/AccountRoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class AccountRoleRepository : SqlServer.AccountRoleRepository
6 | {
7 | public AccountRoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/ConfigType.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Config.Abstractions
2 | {
3 | ///
4 | /// 配置类型
5 | ///
6 | public enum ConfigType
7 | {
8 | ///
9 | /// 库配置
10 | ///
11 | Library,
12 | ///
13 | /// 模块配置
14 | ///
15 | Module
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Abstractions/Enums/SortType.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Data.Abstractions.Enums
2 | {
3 | ///
4 | /// 排序规则
5 | ///
6 | public enum SortType
7 | {
8 | ///
9 | /// 升序
10 | ///
11 | Asc,
12 | ///
13 | /// 降序
14 | ///
15 | Desc
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/RolePermissionRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class RolePermissionRepository : SqlServer.RolePermissionRepository
6 | {
7 | public RolePermissionRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/AccountRoleRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class AccountRoleRepository : SqlServer.AccountRoleRepository
6 | {
7 | public AccountRoleRepository(IDbContext dbContext) : base(dbContext)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/RolePermissionRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class RolePermissionRepository : SqlServer.RolePermissionRepository
6 | {
7 | public RolePermissionRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/components/cache.js:
--------------------------------------------------------------------------------
1 | import module from '../../module'
2 |
3 | export default name => {
4 | const root = `${module.code}/${name}/`
5 | const crud = $http.crud(root)
6 | const urls = {
7 | clear: root + 'Clear'
8 | }
9 | const clear = prefix => {
10 | return $http.delete(urls.clear, { prefix })
11 | }
12 | return {
13 | ...crud,
14 | clear
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Minio/OSS.Minio.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Framework/Pdf/Pdf.Abstractions/PdfConfig.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Pdf.Abstractions
2 | {
3 | public class PdfConfig
4 | {
5 | ///
6 | /// 提供器
7 | ///
8 | public PdfProvider Provider { get; set; }
9 |
10 | ///
11 | /// 操作时产生的临时文件存储根路径
12 | ///
13 | public string TempPath { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/AccountAuthInfoRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql
4 | {
5 | public class AccountAuthInfoRepository : SqlServer.AccountAuthInfoRepository
6 | {
7 | public AccountAuthInfoRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/AccountConfigRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class AccountConfigRepository : SqlServer.AccountConfigRepository
6 | {
7 | public AccountConfigRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SQLite/AccountAuthInfoRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SQLite
4 | {
5 | public class AccountAuthInfoRepository : SqlServer.AccountAuthInfoRepository
6 | {
7 | public AccountAuthInfoRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/LoginLog/LoginLogEntity.Extend.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions.Attributes;
2 |
3 | namespace NetModular.Module.Admin.Domain.LoginLog
4 | {
5 | public partial class LoginLogEntity
6 | {
7 | [Ignore]
8 | public string PlatformName => Platform.ToDescription();
9 |
10 | [Ignore]
11 | public string LoginModeName => LoginMode.ToDescription();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/RolePermissionRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class RolePermissionRepository : SqlServer.RolePermissionRepository
6 | {
7 | public RolePermissionRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Utils/Utils.Core/Models/SortUpdateModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace NetModular.Lib.Utils.Core.Models
4 | {
5 | ///
6 | /// 排序更新模型
7 | ///
8 | public class SortUpdateModel
9 | {
10 | ///
11 | /// 选项列表
12 | ///
13 | public IList> Options { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/PostgreSQL/AccountAuthInfoRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure.Repositories.PostgreSQL
4 | {
5 | public class AccountAuthInfoRepository : SqlServer.AccountAuthInfoRepository
6 | {
7 | public AccountAuthInfoRepository(IDbContext context) : base(context)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Framework/Data/Core/Data.Core/Entities/ColumnDescriptorCollection.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions.Entities;
2 | using NetModular.Lib.Utils.Core.Abstracts;
3 |
4 | namespace NetModular.Lib.Data.Core.Entities
5 | {
6 | ///
7 | /// 列信息集合
8 | ///
9 | public class ColumnDescriptorCollection : CollectionAbstract, IColumnDescriptorCollection
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Aliyun/OSS.Aliyun.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/Framework/Utils/Utils.Core/Interfaces/IAppShutdownHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace NetModular.Lib.Utils.Core.Interfaces
4 | {
5 | ///
6 | /// 应用关闭处理接口
7 | ///
8 | public interface IAppShutdownHandler
9 | {
10 | ///
11 | /// 处理
12 | ///
13 | ///
14 | Task Handle();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/Data/Data.Common/Repository/CategoryRepository.cs:
--------------------------------------------------------------------------------
1 | using Data.Common.Domain;
2 | using NetModular.Lib.Data.Abstractions;
3 | using NetModular.Lib.Data.Core;
4 |
5 | namespace Data.Common.Repository
6 | {
7 | public class CategoryRepository : RepositoryAbstract, ICategoryRepository
8 | {
9 | public CategoryRepository(IDbContext context) : base(context)
10 | {
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/components/module.js:
--------------------------------------------------------------------------------
1 | import module from '../../module'
2 |
3 | export default name => {
4 | const root = `${module.code}/${name}/`
5 | const crud = $http.crud(root)
6 | const urls = {
7 | select: root + 'select'
8 | }
9 |
10 | /**
11 | * @description 下拉框
12 | */
13 | const select = () => {
14 | return $http.get(urls.select)
15 | }
16 |
17 | return { ...crud, select }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/components/index.js:
--------------------------------------------------------------------------------
1 | import library from 'netmodular-ui/packages/library'
2 | let components = []
3 | const requireComponent = require.context('./', true, /index\.vue$/)
4 | requireComponent.keys().map(fileName => {
5 | components.push({
6 | name: `${library.prefix.toLowerCase()}-${fileName.split('/')[1]}`,
7 | component: requireComponent(fileName).default
8 | })
9 | })
10 | export default components
11 |
--------------------------------------------------------------------------------
/src/Framework/Excel/Excel.Abstractions/ExcelProvider.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NetModular.Lib.Excel.Abstractions
4 | {
5 | ///
6 | /// Excel操作库
7 | ///
8 | public enum ExcelProvider
9 | {
10 | [Description("EPPlus")]
11 | EPPlus,
12 | [Description("NPOI")]
13 | NPOI,
14 | [Description("OpenXml")]
15 | OpenXml
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Framework/Host/Host.Web/IStartLogoProvider.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Host.Web.Options;
2 |
3 | namespace NetModular.Lib.Host.Web
4 | {
5 | ///
6 | /// 启动logo提供器
7 | ///
8 | public interface IStartLogoProvider
9 | {
10 | ///
11 | /// 显示
12 | ///
13 | ///
14 | void Show(HostOptions options);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Framework/Mapper/Mapper.AutoMapper/IMapperConfig.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace NetModular.Lib.Mapper.AutoMapper
4 | {
5 | ///
6 | /// 对象映射绑定
7 | ///
8 | public interface IMapperConfig
9 | {
10 | ///
11 | /// 绑定
12 | ///
13 | ///
14 | void Bind(IMapperConfigurationExpression cfg);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/Data/Data.Common/Domain/CategoryEntity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NetModular.Lib.Data.Abstractions.Entities;
3 | using NetModular.Lib.Data.Core.Entities;
4 |
5 | namespace Data.Common.Domain
6 | {
7 | public class CategoryEntity : Entity, ITenant
8 | {
9 | public Guid? TenantId { get; set; }
10 |
11 | public string Name { get; set; }
12 |
13 | public int Count { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/MimeService/ViewModels/MimeAddModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace NetModular.Module.Admin.Application.MimeService.ViewModels
4 | {
5 | public class MimeAddModel
6 | {
7 | [Required(ErrorMessage = "请输入扩展名")]
8 | public string Ext { get; set; }
9 |
10 | [Required(ErrorMessage = "请输入值")]
11 | public string Value { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/config/index.js:
--------------------------------------------------------------------------------
1 | const isDev = process.env.NODE_ENV !== 'production'
2 |
3 | const config = {
4 | baseUrl: '../api/'
5 | /** 账户类型 */
6 | // accountTypes: [
7 | // { label: '管理员', value: 0 },
8 | // { label: '企业', value: 2 },
9 | // { label: '员工', value: 1 }
10 | // ]
11 | }
12 |
13 | // 开发模式
14 | if (isDev) {
15 | config.baseUrl = 'http://localhost:6220/api/'
16 | }
17 |
18 | export default config
19 |
--------------------------------------------------------------------------------
/src/Framework/MQ/MQ.RabbitMQ/DefaultExchange.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.MQ.RabbitMQ
2 | {
3 | ///
4 | /// 默认交换器
5 | ///
6 | public 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 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/Data/Data.Common/Data.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/RoleService/ViewModels/RoleAddModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace NetModular.Module.Admin.Application.RoleService.ViewModels
4 | {
5 | public class RoleAddModel
6 | {
7 | [Required(ErrorMessage = "请输入角色名称")]
8 | public string Name { get; set; }
9 |
10 | public string Remarks { get; set; }
11 |
12 | public int Sort { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/ISingleAccountLoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace NetModular.Lib.Auth.Abstractions
4 | {
5 | ///
6 | /// 单账户登录处理器
7 | ///
8 | public interface ISingleAccountLoginHandler
9 | {
10 | ///
11 | /// 验证账户是否已在别处登录
12 | ///
13 | ///
14 | Task Validate();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Framework/Host/Host.Api/Host.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/Config/Models/ConfigQueryModel.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Config.Abstractions;
2 | using NetModular.Lib.Data.Query;
3 |
4 | namespace NetModular.Module.Admin.Domain.Config.Models
5 | {
6 | public class ConfigQueryModel : QueryModel
7 | {
8 | public string Key { get; set; }
9 |
10 | ///
11 | /// 类型
12 | ///
13 | public ConfigType? Type { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: ['plugin:vue/essential', '@vue/prettier'],
7 | rules: {
8 | 'no-console': 'off',
9 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
10 | },
11 | parserOptions: {
12 | parser: 'babel-eslint'
13 | },
14 | globals: {
15 | $http: 'readonly',
16 | $api: 'readonly'
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/index.js:
--------------------------------------------------------------------------------
1 | import module from '../module'
2 |
3 | // 注册接口列表为window全局属性
4 | window.$api = {}
5 |
6 | let apis = {}
7 | const requireComponent = require.context('./components', true, /\.*\.js$/)
8 | requireComponent.keys().map(fileName => {
9 | const name = fileName.replace('./', '').replace('.js', '')
10 | const func = requireComponent(fileName).default
11 | apis[name] = func(name)
12 | })
13 | $api[module.code] = apis
14 |
--------------------------------------------------------------------------------
/src/Framework/Excel/Excel.NPOI/Excel.NPOI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/ApiControllerAbstract.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using NetModular.Lib.Validation.Abstractions;
3 |
4 | namespace NetModular.Lib.Auth.Web
5 | {
6 | ///
7 | /// 公共接口抽象控制器
8 | ///
9 | [Route("api/v1/[controller]/[action]")]
10 | [ApiController]
11 | [ValidateResultFormat]
12 | public abstract class ApiControllerAbstract : ControllerBase
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Framework/Excel/Excel.Aspose/Excel.Aspose.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/MenuService/ViewModels/MenuUpdateModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 |
4 | namespace NetModular.Module.Admin.Application.MenuService.ViewModels
5 | {
6 | ///
7 | /// 新增菜单
8 | ///
9 | public class MenuUpdateModel : MenuAddModel
10 | {
11 | //编号
12 | [Required(ErrorMessage = "请选择要编辑的菜单")]
13 | public Guid Id { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginModels/CustomLoginModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Auth.Abstractions.LoginModels
2 | {
3 | ///
4 | /// 自定义登录
5 | ///
6 | public class CustomLoginModel : LoginModel
7 | {
8 | public override LoginMode Mode => LoginMode.Custom;
9 |
10 | ///
11 | /// 登数Json数据
12 | ///
13 | public string JsonData { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Framework/Utils/Utils.Core/Enums/Sex.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NetModular.Lib.Utils.Core.Enums
4 | {
5 | ///
6 | /// 性别
7 | ///
8 | public enum Sex
9 | {
10 | ///
11 | /// 未知
12 | ///
13 | [Description("未知")]
14 | UnKnown = -1,
15 | [Description("男")]
16 | Boy,
17 | [Description("女")]
18 | Girl
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Framework/Utils/Utils.Core/Models/CoordinateModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Utils.Core.Models
2 | {
3 | ///
4 | /// 坐标模型
5 | ///
6 | public class CoordinateModel
7 | {
8 | ///
9 | /// 经度
10 | ///
11 | public string Lng { get; set; }
12 |
13 | ///
14 | /// 纬度
15 | ///
16 | public string Lat { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/QuartzTaskDescriptor.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Quartz.Abstractions
2 | {
3 | ///
4 | /// 任务描述信息
5 | ///
6 | public class QuartzTaskDescriptor
7 | {
8 | ///
9 | /// 名称
10 | ///
11 | public string Name { get; set; }
12 |
13 | ///
14 | /// 类名称
15 | ///
16 | public string Class { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginModels/VerifyCodeModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Auth.Abstractions.LoginModels
2 | {
3 | ///
4 | /// 验证码模型
5 | ///
6 | public class VerifyCodeModel
7 | {
8 | ///
9 | /// ID
10 | ///
11 | public string Id { get; set; }
12 |
13 | ///
14 | /// 验证码
15 | ///
16 | public string Code { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Host/Host.Web/Middleware/ExceptionHandleMiddlewareExtensions.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | using Microsoft.AspNetCore.Builder;
4 |
5 | namespace NetModular.Lib.Host.Web.Middleware
6 | {
7 | public static class ExceptionHandleMiddlewareExtensions
8 | {
9 | public static IApplicationBuilder UseExceptionHandle(this IApplicationBuilder app)
10 | {
11 | app.UseMiddleware();
12 |
13 | return app;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SqlServer/TenantRepository.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Data.Abstractions;
2 | using NetModular.Lib.Data.Core;
3 | using NetModular.Module.Admin.Domain.Tenant;
4 |
5 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SqlServer
6 | {
7 | public class TenantRepository : RepositoryAbstract, ITenantRepository
8 | {
9 | public TenantRepository(IDbContext context) : base(context)
10 | {
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Web/Validators/AccountUpdateValidator.cs:
--------------------------------------------------------------------------------
1 | using FluentValidation;
2 | using NetModular.Module.Admin.Application.AccountService.ViewModels;
3 |
4 | namespace NetModular.Module.Admin.Web.Validators
5 | {
6 | public class AccountUpdateValidator : AbstractValidator
7 | {
8 | public AccountUpdateValidator()
9 | {
10 | RuleFor(x => x.Email).EmailAddress().When(x => x.Email.NotNull()).WithMessage("请输入正确的邮箱地址");
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/ITask.cs:
--------------------------------------------------------------------------------
1 | using Quartz;
2 | using System.Threading.Tasks;
3 |
4 | namespace NetModular.Lib.Quartz.Abstractions
5 | {
6 | ///
7 | /// 任务接口
8 | ///
9 | public interface ITask : IJob
10 | {
11 | ///
12 | /// 执行方法
13 | ///
14 | ///
15 | ///
16 | Task Execute(ITaskExecutionContext context);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Admin/Library/Domain/FileOwner/IFileOwnerRepository.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Data.Abstractions;
3 |
4 | namespace NetModular.Module.Admin.Domain.FileOwner
5 | {
6 | public interface IFileOwnerRepository : IRepository
7 | {
8 | ///
9 | /// 判断是否存在
10 | ///
11 | ///
12 | ///
13 | Task Exist(FileOwnerEntity entity);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Framework/Excel/Excel.Abstractions/ExcelConfig.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Excel.Abstractions
2 | {
3 | ///
4 | /// Excel操作配置项
5 | ///
6 | public class ExcelConfig
7 | {
8 | ///
9 | /// Excel提供器
10 | ///
11 | public ExcelProvider Provider { get; set; }
12 |
13 | ///
14 | /// Excel操作时产生的临时文件存储根路径
15 | ///
16 | public string TempPath { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Module/Module.GenericHost/ModuleAssemblyDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using NetModular.Lib.Module.Abstractions;
3 |
4 | namespace NetModular.Lib.Module.GenericHost
5 | {
6 | public class ModuleAssemblyDescriptor : IModuleAssemblyDescriptor
7 | {
8 | public Assembly Application { get; set; }
9 |
10 | public Assembly Domain { get; set; }
11 |
12 | public Assembly Infrastructure { get; set; }
13 | public Assembly Quartz { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/IConfigChangeEvent.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Config.Abstractions
2 | {
3 | ///
4 | /// 配置变更事件
5 | ///
6 | public interface IConfigChangeEvent where TConfig : IConfig
7 | {
8 | ///
9 | /// 变更事件
10 | ///
11 | ///
12 | ///
13 | void OnChanged(TConfig newConfig, TConfig oldConfig);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/QuartzProvider.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NetModular.Lib.Quartz.Abstractions
4 | {
5 | public enum QuartzProvider
6 | {
7 | [Description("SqlServer")]
8 | SqlServer,
9 | [Description("MySqlConnector")]
10 | MySql,
11 | [Description("SQLite-Microsoft")]
12 | SQLite,
13 | [Description("OracleODP")]
14 | Oracle,
15 | [Description("Npgsql")]
16 | PostgreSQL
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/test/Utils/Utils.Core.Tests/BaseTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Extensions.DependencyInjection;
3 | using NetModular.Lib.Utils.Core;
4 |
5 | namespace Utils.Core.Tests
6 | {
7 | public abstract class BaseTest
8 | {
9 | protected readonly IServiceProvider SP;
10 |
11 | protected BaseTest()
12 | {
13 | var service = new ServiceCollection();
14 | service.AddNetModularServices();
15 | SP = service.BuildServiceProvider();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Cache/Cache.Abstractions/CacheProvider.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace NetModular.Lib.Cache.Abstractions
4 | {
5 | ///
6 | /// 缓存提供器
7 | ///
8 | public enum CacheProvider
9 | {
10 | ///
11 | /// 内存缓存
12 | ///
13 | [Description("内存缓存")]
14 | MemoryCache,
15 | ///
16 | /// Redis
17 | ///
18 | [Description("Redis")]
19 | Redis
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Framework/Data/Extend/Data.Query/QuerySortModel.cs:
--------------------------------------------------------------------------------
1 |
2 | using NetModular.Lib.Data.Abstractions.Enums;
3 |
4 | namespace NetModular.Lib.Data.Query
5 | {
6 | ///
7 | /// 查询排序模型
8 | ///
9 | public class QuerySortModel
10 | {
11 | ///
12 | /// 字段
13 | ///
14 | public string Field { get; set; }
15 |
16 | ///
17 | /// 排序类型
18 | ///
19 | public SortType Type { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/RoleService/ViewModels/RoleMenuBindModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | namespace NetModular.Module.Admin.Application.RoleService.ViewModels
6 | {
7 | public class RoleMenuBindModel
8 | {
9 | [Required(ErrorMessage = "请选择角色")]
10 | public Guid RoleId { get; set; }
11 |
12 | ///
13 | /// 菜单列表
14 | ///
15 | public List Menus { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Framework/Data/Db/Data.SQLite/GuidTypeHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Dapper;
3 |
4 | namespace NetModular.Lib.Data.SQLite
5 | {
6 | public class GuidTypeHandler : SqlMapper.TypeHandler
7 | {
8 | public override Guid Parse(object value)
9 | {
10 | return Guid.Parse(value.ToString());
11 | }
12 |
13 | public override void SetValue(System.Data.IDbDataParameter parameter, Guid value)
14 | {
15 | parameter.Value = value.ToString();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Validation/Validation.Abstractions/IValidateResultFormatHandler.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc.Filters;
2 |
3 | namespace NetModular.Lib.Validation.Abstractions
4 | {
5 | ///
6 | /// 验证结果格式化器
7 | ///
8 | public interface IValidateResultFormatHandler
9 | {
10 | ///
11 | /// 格式化处理
12 | ///
13 | ///
14 | ///
15 | void Format(ResultExecutingContext context);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Admin/WebHost/_modules/00_Admin/InitData/Role.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Id": "39F08CFD-8DD0-BB54-4544-C2DC43C6CA38",
4 | "Name": "超级管理员",
5 | "Remarks": "超级管理员",
6 | "IsSpecified": 0,
7 | "CreatedTime": "2019-09-29 10:19:21",
8 | "CreatedBy": "00000000-0000-0000-0000-000000000000",
9 | "ModifiedTime": "2020-01-13 19:26:56",
10 | "ModifiedBy": "39F08CFD-8E0D-771B-A2F3-2639A62CA2FA",
11 | "Deleted": 0,
12 | "DeletedTime": "2019-09-29 10:19:21",
13 | "DeletedBy": "00000000-0000-0000-0000-000000000000"
14 | }
15 | ]
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/components/log.js:
--------------------------------------------------------------------------------
1 | import module from '../../module'
2 |
3 | export default name => {
4 | const root = `${module.code}/${name}/`
5 | const urls = {
6 | queryLogin: root + 'Login',
7 | exportLogin: root + 'LoginExport'
8 | }
9 |
10 | const queryLogin = params => {
11 | return $http.get(urls.queryLogin, params)
12 | }
13 |
14 | const exportLogin = params => {
15 | return $http.export(urls.exportLogin, params)
16 | }
17 |
18 | return {
19 | queryLogin,
20 | exportLogin
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Framework/Excel/Excel.EPPlus/EPPlusExcelHandler.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Auth.Abstractions;
2 | using NetModular.Lib.Config.Abstractions;
3 | using NetModular.Lib.Excel.Abstractions;
4 |
5 | namespace NetModular.Lib.Excel.EPPlus
6 | {
7 | public class EPPlusExcelHandler : ExcelHandlerAbstract
8 | {
9 | public EPPlusExcelHandler(ILoginInfo loginInfo, IExcelExportHandler exportHandler, ExcelConfig config, IConfigProvider configProvider) : base(loginInfo, exportHandler, config, configProvider)
10 | {
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/ConfigService/ViewModels/ConfigUpdateModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using NetModular.Lib.Config.Abstractions;
3 |
4 | namespace NetModular.Module.Admin.Application.ConfigService.ViewModels
5 | {
6 | public class ConfigUpdateModel
7 | {
8 | [Required(ErrorMessage = "配置类编码不能为空")]
9 | public string Code { get; set; }
10 |
11 | public ConfigType Type { get; set; }
12 |
13 | [Required(ErrorMessage = "配置内容不能为空")]
14 | public string Json { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/AdminConfig.cs:
--------------------------------------------------------------------------------
1 | using NetModular.Lib.Config.Abstractions;
2 |
3 | namespace NetModular.Module.Admin.Infrastructure
4 | {
5 | ///
6 | /// 权限管理配置项
7 | ///
8 | public class AdminConfig : IConfig
9 | {
10 | ///
11 | /// 启用登录日志
12 | ///
13 | public bool LoginLog { get; set; }
14 |
15 | ///
16 | /// 账户默认密码
17 | ///
18 | public string DefaultPassword { get; set; } = "123456";
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/ITenantResolver.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions
5 | {
6 | ///
7 | /// 租户解析器接口
8 | ///
9 | public interface ITenantResolver
10 | {
11 | ///
12 | /// 解析租户ID
13 | ///
14 | /// 登录结果
15 | ///
16 | Task Resolve(LoginResultModel loginResultModel);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Quartz/Quartz.Abstractions/ITaskExecutionContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Quartz;
3 |
4 | namespace NetModular.Lib.Quartz.Abstractions
5 | {
6 | ///
7 | /// 任务执行上下文
8 | ///
9 | public interface ITaskExecutionContext
10 | {
11 | ///
12 | /// 任务编号
13 | ///
14 | Guid JobId { get; set; }
15 |
16 | ///
17 | /// Quartz的任务执行上下文
18 | ///
19 | IJobExecutionContext JobExecutionContext { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/Providers/ILoginLogProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions.Providers
5 | {
6 | ///
7 | /// 登录日志处理
8 | ///
9 | public interface ILoginLogProvider
10 | {
11 | ///
12 | /// 处理
13 | ///
14 | /// 登录结果
15 | ///
16 | Task Handle(LoginResultModel loginResult);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/DefaultTenantResolver.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions;
3 | using NetModular.Lib.Auth.Abstractions.LoginModels;
4 | using NetModular.Lib.Utils.Core.Attributes;
5 |
6 | namespace NetModular.Lib.Auth.Web
7 | {
8 | [Singleton]
9 | public class DefaultTenantResolver : ITenantResolver
10 | {
11 | public Task Resolve(LoginResultModel loginResultModel)
12 | {
13 | loginResultModel.TenantId = null;
14 | return Task.CompletedTask;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Admin/Web/Core/DefaultLoginClaimsExtendProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Security.Claims;
4 | using NetModular.Lib.Auth.Abstractions;
5 | using NetModular.Lib.Auth.Web;
6 | using NetModular.Lib.Utils.Core.Attributes;
7 |
8 | namespace NetModular.Module.Admin.Web.Core
9 | {
10 | [Singleton]
11 | internal class DefaultLoginClaimsExtendProvider : ILoginClaimsExtendProvider
12 | {
13 | public List GetExtendClaims(Guid accountId)
14 | {
15 | return null;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Qiniu.SDK/OSS.Qiniu.SDK.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/MySql/Sql/AuditInfoSql.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Module.Admin.Infrastructure.Repositories.MySql.Sql
2 | {
3 | public static class AuditInfoSql
4 | {
5 | ///
6 | /// 查询最近一周访问量
7 | ///
8 | public const string QueryLatestWeekPv = @"SELECT
9 | DATE_FORMAT(ExecutionTime, '%Y-%m-%d' ) `Key`,
10 | COUNT(0) `Value`
11 | FROM
12 | {0}
13 | WHERE
14 | ExecutionTime > DATE_FORMAT( DATE_ADD(NOW(), interval -6 day), '%Y-%m-%d' )
15 | GROUP BY
16 | `Key` ORDER BY `Key`";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/IPermissionValidateHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 | using NetModular.Lib.Utils.Core.Enums;
4 |
5 | namespace NetModular.Lib.Auth.Abstractions
6 | {
7 | ///
8 | /// 权限验证处理接口
9 | ///
10 | public interface IPermissionValidateHandler
11 | {
12 | ///
13 | /// 验证
14 | ///
15 | ///
16 | Task Validate(IDictionary routeValues, HttpMethod httpMethod);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginHandlers/IEmailLoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions.LoginHandlers
5 | {
6 | ///
7 | /// 邮件登录处理
8 | ///
9 | public interface IEmailLoginHandler
10 | {
11 | ///
12 | /// 登录处理
13 | ///
14 | ///
15 | ///
16 | Task Handle(EmailLoginModel model);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginHandlers/IPhoneLoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions.LoginHandlers
5 | {
6 | ///
7 | /// 手机登录处理
8 | ///
9 | public interface IPhoneLoginHandler
10 | {
11 | ///
12 | /// 登录处理
13 | ///
14 | ///
15 | ///
16 | Task Handle(PhoneLoginModel model);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/RoleService/ViewModels/RolePermissionBindModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using NetModular.Lib.Auth.Abstractions;
4 | using NetModular.Lib.Utils.Core.Validations;
5 |
6 | namespace NetModular.Module.Admin.Application.RoleService.ViewModels
7 | {
8 | public class RolePermissionBindModel
9 | {
10 | [NotEmpty(ErrorMessage = "请选择角色")]
11 | public Guid RoleId { get; set; }
12 |
13 | public Platform Platform { get; set; }
14 |
15 | public List Permissions { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Admin/Library/Infrastructure/Repositories/SqlServer/Sql/AuditInfoSql.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Module.Admin.Infrastructure.Repositories.SqlServer.Sql
2 | {
3 | public static class AuditInfoSql
4 | {
5 | ///
6 | /// 查询最近一周访问量
7 | ///
8 | public const string QueryLatestWeekPv = @"SELECT CONVERT(VARCHAR(100), ExecutionTime, 23) AS [Key],
9 | COUNT(0) AS [Value]
10 | FROM dbo.{0}
11 | WHERE ExecutionTime > DATEADD(DAY, -6, GETDATE())
12 | GROUP BY CONVERT(VARCHAR(100), ExecutionTime, 23)
13 | ORDER BY [Key];";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/api/components/permission.js:
--------------------------------------------------------------------------------
1 | import module from '../../module'
2 |
3 | export default name => {
4 | const root = `${module.code}/${name}/`
5 | const crud = $http.crud(root)
6 |
7 | const urls = {
8 | tree: root + 'Tree',
9 | queryByCodes: root + 'QueryByCodes'
10 | }
11 |
12 | const tree = () => {
13 | return $http.get(urls.tree)
14 | }
15 |
16 | const queryByCodes = codes => {
17 | return $http.get(urls.queryByCodes, { codes })
18 | }
19 |
20 | return {
21 | ...crud,
22 | tree,
23 | queryByCodes
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Admin/UI/module-admin/src/views/module/index/page.js:
--------------------------------------------------------------------------------
1 | /** 页面信息 */
2 | const page = new (function() {
3 | this.title = '模块中心'
4 | this.icon = 'product'
5 | this.name = 'admin_module'
6 | this.path = '/admin/module'
7 |
8 | // 关联权限
9 | this.permissions = [`${this.name}_query_get`, `admin_permission_query_get`, `admin_permission_querybycodes_get`]
10 |
11 | // 按钮
12 | this.buttons = {}
13 | })()
14 |
15 | /** 路由信息 */
16 | export const route = {
17 | page,
18 | component: () => import(/* webpackChunkName: "admin.module" */ './index')
19 | }
20 |
21 | export default page
22 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/ILoginClaimsExtendProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Security.Claims;
4 |
5 | namespace NetModular.Lib.Auth.Abstractions
6 | {
7 | ///
8 | /// 登录Claims扩展处理器
9 | ///
10 | public interface ILoginClaimsExtendProvider
11 | {
12 | ///
13 | /// 获取扩展Claims列表
14 | ///
15 | /// 账户编号
16 | ///
17 | List GetExtendClaims(Guid accountId);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/ILoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Security.Claims;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions
5 | {
6 | ///
7 | /// 登录处理
8 | ///
9 | public interface ILoginHandler
10 | {
11 | ///
12 | /// 登录处理
13 | ///
14 | /// 信息
15 | /// 扩展数据
16 | ///
17 | IResultModel Hand(List claims, string extendData);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginHandlers/ICustomLoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions.LoginHandlers
5 | {
6 | ///
7 | /// 自定义登录处理器
8 | ///
9 | public interface ICustomLoginHandler
10 | {
11 | ///
12 | /// 登录处理
13 | ///
14 | ///
15 | ///
16 | Task Handle(CustomLoginModel model);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Abstractions/OSS.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Admin/Library/Application/RoleService/_MapperConfig.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using NetModular.Lib.Mapper.AutoMapper;
3 | using NetModular.Module.Admin.Application.RoleService.ViewModels;
4 | using NetModular.Module.Admin.Domain.Role;
5 |
6 | namespace NetModular.Module.Admin.Application.RoleService
7 | {
8 | public class MapperConfig : IMapperConfig
9 | {
10 | public void Bind(IMapperConfigurationExpression cfg)
11 | {
12 | cfg.CreateMap();
13 | cfg.AddMap();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Framework/OSS/OSS.Integration/OSS.Integration.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Framework/Pdf/Pdf.Integration/Pdf.Integration.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Admin/Web/Validators/AccountAddValidator.cs:
--------------------------------------------------------------------------------
1 | using FluentValidation;
2 | using NetModular.Module.Admin.Application.AccountService.ViewModels;
3 |
4 | namespace NetModular.Module.Admin.Web.Validators
5 | {
6 | public class AccountAddValidator : AbstractValidator
7 | {
8 | public AccountAddValidator()
9 | {
10 | RuleFor(x => x.Email).EmailAddress().When(x => x.Email.NotNull()).WithMessage("请输入正确的邮箱地址");
11 | RuleFor(x => x.Password).Length(6, 100).When(x => x.Password.NotNull()).WithMessage("密码不能小于6位");
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/LoginHandlers/IUserNameLoginHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using NetModular.Lib.Auth.Abstractions.LoginModels;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions.LoginHandlers
5 | {
6 | ///
7 | /// 用户名登录处理器
8 | ///
9 | public interface IUserNameLoginHandler
10 | {
11 | ///
12 | /// 登录处理
13 | ///
14 | ///
15 | ///
16 | Task Handle(UserNameLoginModel model);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Jwt/JwtTokenModel.cs:
--------------------------------------------------------------------------------
1 | namespace NetModular.Lib.Auth.Jwt
2 | {
3 | ///
4 | /// JWT令牌
5 | ///
6 | public class JwtTokenModel
7 | {
8 | ///
9 | /// jwt令牌
10 | ///
11 | public string AccessToken { get; set; }
12 |
13 | ///
14 | /// 刷新令牌
15 | ///
16 | public string RefreshToken { get; set; }
17 |
18 | ///
19 | /// 有效期(秒)
20 | ///
21 | public int ExpiresIn { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Web/IAuditingHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Microsoft.AspNetCore.Mvc.Filters;
3 |
4 | namespace NetModular.Lib.Auth.Web
5 | {
6 | ///
7 | /// 审计日志处理接口
8 | ///
9 | public interface IAuditingHandler
10 | {
11 | ///
12 | /// 处理
13 | ///
14 | /// 请求上下文
15 | /// 请求委托
16 | ///
17 | Task Hand(ActionExecutingContext context, ActionExecutionDelegate next);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Framework/Config/Config.Abstractions/Config.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | snupkg
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Framework/Auth/Auth.Abstractions/ILoginInfoDetailsBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace NetModular.Lib.Auth.Abstractions
5 | {
6 | ///
7 | /// 登录信息详情生成器
8 | ///
9 | public interface ILoginInfoDetailsBuilder
10 | {
11 | ///
12 | /// 账户类型
13 | ///
14 | AccountType AccountType { get; }
15 |
16 | ///
17 | /// 生成详细信息
18 | ///
19 | ///
20 | Task