├── .env.example ├── .github ├── init.sql ├── swoole.install.sh └── workflows │ ├── build.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .gitlab-ci.yml ├── .php-cs-fixer.php ├── .phpstorm.meta.php ├── Dockerfile ├── LICENSE ├── README.md ├── app ├── Constants │ ├── ErrorCode.php │ └── ErrorCodeInterface.php ├── Controller │ ├── Controller.php │ └── IndexController.php ├── Exception │ ├── BusinessException.php │ └── Handler │ │ ├── BusinessExceptionHandler.php │ │ └── RPCExceptionHandler.php ├── Job │ └── TenantJob.php ├── Kernel │ ├── ClassMap │ │ ├── Coroutine.php │ │ └── ResolverDispatcher.php │ ├── Context │ │ └── Coroutine.php │ ├── Event │ │ └── EventDispatcherFactory.php │ ├── Functions.php │ ├── Http │ │ ├── Response.php │ │ └── WorkerStartListener.php │ ├── Log │ │ ├── AppendRequestIdProcessor.php │ │ └── LoggerFactory.php │ └── Tenant │ │ ├── AsyncMessage.php │ │ ├── ConnectionResolver.php │ │ ├── RedisDriver.php │ │ └── Tenant.php ├── Listener │ ├── DbQueryExecutedListener.php │ ├── FailToHandleListener.php │ ├── QueueHandleListener.php │ └── ResumeExitCoordinatorListener.php ├── Middleware │ └── TenantMiddleware.php └── Model │ ├── Model.php │ └── User.php ├── bin └── hyperf.php ├── composer.json ├── config ├── autoload │ ├── annotations.php │ ├── aspects.php │ ├── async_queue.php │ ├── cache.php │ ├── commands.php │ ├── databases.php │ ├── dependencies.php │ ├── devtool.php │ ├── exceptions.php │ ├── listeners.php │ ├── logger.php │ ├── middlewares.php │ ├── processes.php │ ├── redis.php │ └── server.php ├── config.php ├── container.php └── routes.php ├── deploy.test.yml ├── docker-compose.yml ├── mysql.sql ├── phpstan.neon ├── phpunit.xml └── test ├── Cases └── ExampleTest.php ├── HttpTestCase.php └── bootstrap.php /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.env.example -------------------------------------------------------------------------------- /.github/init.sql: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/swoole.install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.github/swoole.install.sh -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.gitlab-ci.yml -------------------------------------------------------------------------------- /.php-cs-fixer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.php-cs-fixer.php -------------------------------------------------------------------------------- /.phpstorm.meta.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/.phpstorm.meta.php -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/README.md -------------------------------------------------------------------------------- /app/Constants/ErrorCode.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Constants/ErrorCode.php -------------------------------------------------------------------------------- /app/Constants/ErrorCodeInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Constants/ErrorCodeInterface.php -------------------------------------------------------------------------------- /app/Controller/Controller.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Controller/Controller.php -------------------------------------------------------------------------------- /app/Controller/IndexController.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Controller/IndexController.php -------------------------------------------------------------------------------- /app/Exception/BusinessException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Exception/BusinessException.php -------------------------------------------------------------------------------- /app/Exception/Handler/BusinessExceptionHandler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Exception/Handler/BusinessExceptionHandler.php -------------------------------------------------------------------------------- /app/Exception/Handler/RPCExceptionHandler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Exception/Handler/RPCExceptionHandler.php -------------------------------------------------------------------------------- /app/Job/TenantJob.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Job/TenantJob.php -------------------------------------------------------------------------------- /app/Kernel/ClassMap/Coroutine.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/ClassMap/Coroutine.php -------------------------------------------------------------------------------- /app/Kernel/ClassMap/ResolverDispatcher.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/ClassMap/ResolverDispatcher.php -------------------------------------------------------------------------------- /app/Kernel/Context/Coroutine.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Context/Coroutine.php -------------------------------------------------------------------------------- /app/Kernel/Event/EventDispatcherFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Event/EventDispatcherFactory.php -------------------------------------------------------------------------------- /app/Kernel/Functions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Functions.php -------------------------------------------------------------------------------- /app/Kernel/Http/Response.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Http/Response.php -------------------------------------------------------------------------------- /app/Kernel/Http/WorkerStartListener.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Http/WorkerStartListener.php -------------------------------------------------------------------------------- /app/Kernel/Log/AppendRequestIdProcessor.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Log/AppendRequestIdProcessor.php -------------------------------------------------------------------------------- /app/Kernel/Log/LoggerFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Log/LoggerFactory.php -------------------------------------------------------------------------------- /app/Kernel/Tenant/AsyncMessage.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Tenant/AsyncMessage.php -------------------------------------------------------------------------------- /app/Kernel/Tenant/ConnectionResolver.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Tenant/ConnectionResolver.php -------------------------------------------------------------------------------- /app/Kernel/Tenant/RedisDriver.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Tenant/RedisDriver.php -------------------------------------------------------------------------------- /app/Kernel/Tenant/Tenant.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Kernel/Tenant/Tenant.php -------------------------------------------------------------------------------- /app/Listener/DbQueryExecutedListener.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Listener/DbQueryExecutedListener.php -------------------------------------------------------------------------------- /app/Listener/FailToHandleListener.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Listener/FailToHandleListener.php -------------------------------------------------------------------------------- /app/Listener/QueueHandleListener.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Listener/QueueHandleListener.php -------------------------------------------------------------------------------- /app/Listener/ResumeExitCoordinatorListener.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Listener/ResumeExitCoordinatorListener.php -------------------------------------------------------------------------------- /app/Middleware/TenantMiddleware.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Middleware/TenantMiddleware.php -------------------------------------------------------------------------------- /app/Model/Model.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Model/Model.php -------------------------------------------------------------------------------- /app/Model/User.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/app/Model/User.php -------------------------------------------------------------------------------- /bin/hyperf.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/bin/hyperf.php -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/composer.json -------------------------------------------------------------------------------- /config/autoload/annotations.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/annotations.php -------------------------------------------------------------------------------- /config/autoload/aspects.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/aspects.php -------------------------------------------------------------------------------- /config/autoload/async_queue.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/async_queue.php -------------------------------------------------------------------------------- /config/autoload/cache.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/cache.php -------------------------------------------------------------------------------- /config/autoload/commands.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/commands.php -------------------------------------------------------------------------------- /config/autoload/databases.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/databases.php -------------------------------------------------------------------------------- /config/autoload/dependencies.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/dependencies.php -------------------------------------------------------------------------------- /config/autoload/devtool.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/devtool.php -------------------------------------------------------------------------------- /config/autoload/exceptions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/exceptions.php -------------------------------------------------------------------------------- /config/autoload/listeners.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/listeners.php -------------------------------------------------------------------------------- /config/autoload/logger.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/logger.php -------------------------------------------------------------------------------- /config/autoload/middlewares.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/middlewares.php -------------------------------------------------------------------------------- /config/autoload/processes.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/processes.php -------------------------------------------------------------------------------- /config/autoload/redis.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/redis.php -------------------------------------------------------------------------------- /config/autoload/server.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/autoload/server.php -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/config.php -------------------------------------------------------------------------------- /config/container.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/container.php -------------------------------------------------------------------------------- /config/routes.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/config/routes.php -------------------------------------------------------------------------------- /deploy.test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/deploy.test.yml -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /mysql.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/mysql.sql -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/phpstan.neon -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/phpunit.xml -------------------------------------------------------------------------------- /test/Cases/ExampleTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/test/Cases/ExampleTest.php -------------------------------------------------------------------------------- /test/HttpTestCase.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/test/HttpTestCase.php -------------------------------------------------------------------------------- /test/bootstrap.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingxinleo/tenant-skeleton/HEAD/test/bootstrap.php --------------------------------------------------------------------------------