diff --git a/README.md b/README.md index be90e7f..a493583 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,4 @@ 3. 송금 후에는 계좌잔액을 노출해야 한다. 4. 송금 내역은 5개월동안 보장되고 그 이후의 내역은 삭제되어야 한다. + diff --git a/build/classes/kotlin/main/META-INF/EST-s-Payments.kotlin_module b/build/classes/kotlin/main/META-INF/EST-s-Payments.kotlin_module new file mode 100644 index 0000000..12c82c0 Binary files /dev/null and b/build/classes/kotlin/main/META-INF/EST-s-Payments.kotlin_module differ diff --git a/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplication.class b/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplication.class new file mode 100644 index 0000000..4ffb0dc Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplication.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplicationKt.class b/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplicationKt.class new file mode 100644 index 0000000..ac736d8 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/EstPaymentsApplicationKt.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/AccountController.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/AccountController.class new file mode 100644 index 0000000..11154cf Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/AccountController.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/TransactionController.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/TransactionController.class new file mode 100644 index 0000000..952c9a2 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/TransactionController.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateRequest.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateRequest.class new file mode 100644 index 0000000..605046c Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateRequest.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse$Companion.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse$Companion.class new file mode 100644 index 0000000..7ce60b4 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse$Companion.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse.class new file mode 100644 index 0000000..5cbed28 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountCreateResponse.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse$Companion.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse$Companion.class new file mode 100644 index 0000000..853ab98 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse$Companion.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse.class new file mode 100644 index 0000000..11088cb Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/AccountResponse.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.class new file mode 100644 index 0000000..68b989c Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse$Companion.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse$Companion.class new file mode 100644 index 0000000..b3df166 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse$Companion.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse.class b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse.class new file mode 100644 index 0000000..13b96b0 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/in/web/dto/TransactionExecuteResponse.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountEntity.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountEntity.class new file mode 100644 index 0000000..6421757 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountEntity.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountMapper.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountMapper.class new file mode 100644 index 0000000..85776ba Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountMapper.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.class new file mode 100644 index 0000000..15fcae2 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountRepository.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountRepository.class new file mode 100644 index 0000000..2f75b62 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/AccountRepository.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.class new file mode 100644 index 0000000..85f0d03 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionEntity.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionEntity.class new file mode 100644 index 0000000..a92eab8 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionEntity.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionMapper.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionMapper.class new file mode 100644 index 0000000..8f20b3c Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionMapper.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.class new file mode 100644 index 0000000..9a1683e Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionRepository.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionRepository.class new file mode 100644 index 0000000..8806566 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/TransactionRepository.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserEntity.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserEntity.class new file mode 100644 index 0000000..7fa61b8 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserEntity.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserRepository.class b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserRepository.class new file mode 100644 index 0000000..b27376b Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/adapter/out/persistence/UserRepository.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Account.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Account.class new file mode 100644 index 0000000..35954e7 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Account.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/AccountId.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/AccountId.class new file mode 100644 index 0000000..75f4de6 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/AccountId.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Money.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Money.class new file mode 100644 index 0000000..b8466ab Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Money.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Transaction.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Transaction.class new file mode 100644 index 0000000..fd37a23 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/Transaction.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionId.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionId.class new file mode 100644 index 0000000..7824f4a Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionId.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionStatus.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionStatus.class new file mode 100644 index 0000000..570d80a Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/TransactionStatus.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/User.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/User.class new file mode 100644 index 0000000..a1db27e Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/User.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/model/UserId.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/UserId.class new file mode 100644 index 0000000..e278f75 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/model/UserId.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountCreateService.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountCreateService.class new file mode 100644 index 0000000..8576d8a Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountCreateService.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountFindService.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountFindService.class new file mode 100644 index 0000000..8cb716a Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/AccountFindService.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/domain/service/TransactionExecuteService.class b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/TransactionExecuteService.class new file mode 100644 index 0000000..0fe5b95 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/domain/service/TransactionExecuteService.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountCreateUseCase.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountCreateUseCase.class new file mode 100644 index 0000000..eb50d7f Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountCreateUseCase.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountFindUseCase.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountFindUseCase.class new file mode 100644 index 0000000..9578618 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/AccountFindUseCase.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/TransactionExecuteUseCase.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/TransactionExecuteUseCase.class new file mode 100644 index 0000000..c3daaa6 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/TransactionExecuteUseCase.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountCreateCommand.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountCreateCommand.class new file mode 100644 index 0000000..f7dc3c3 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountCreateCommand.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountFindCommand.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountFindCommand.class new file mode 100644 index 0000000..1ab50a9 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/AccountFindCommand.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/TransactionExecuteCommand.class b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/TransactionExecuteCommand.class new file mode 100644 index 0000000..8c70e14 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/in/command/TransactionExecuteCommand.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountCreatePort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountCreatePort.class new file mode 100644 index 0000000..81d2ed3 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountCreatePort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountFindPort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountFindPort.class new file mode 100644 index 0000000..764b6de Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountFindPort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountUpdatePort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountUpdatePort.class new file mode 100644 index 0000000..d0daa70 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/AccountUpdatePort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionCreatePort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionCreatePort.class new file mode 100644 index 0000000..438a5e6 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionCreatePort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionFindPort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionFindPort.class new file mode 100644 index 0000000..1d6bd4d Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionFindPort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionUpdatePort.class b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionUpdatePort.class new file mode 100644 index 0000000..b940af1 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/application/port/out/TransactionUpdatePort.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/common/Constant.class b/build/classes/kotlin/main/com/example/estpayments/common/Constant.class new file mode 100644 index 0000000..b4d976f Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/common/Constant.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/common/annotation/PersistenceAdapter.class b/build/classes/kotlin/main/com/example/estpayments/common/annotation/PersistenceAdapter.class new file mode 100644 index 0000000..b1ddc73 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/common/annotation/PersistenceAdapter.class differ diff --git a/build/classes/kotlin/main/com/example/estpayments/config/ImprovedNamingStrategy.class b/build/classes/kotlin/main/com/example/estpayments/config/ImprovedNamingStrategy.class new file mode 100644 index 0000000..0c51be3 Binary files /dev/null and b/build/classes/kotlin/main/com/example/estpayments/config/ImprovedNamingStrategy.class differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab new file mode 100644 index 0000000..f2155a7 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream new file mode 100644 index 0000000..e73bd05 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len new file mode 100644 index 0000000..0dfd164 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len new file mode 100644 index 0000000..709f734 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at new file mode 100644 index 0000000..7214133 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i new file mode 100644 index 0000000..187b13a Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab new file mode 100644 index 0000000..ea0d0f6 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream new file mode 100644 index 0000000..8f941cd Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len new file mode 100644 index 0000000..e8086ba Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len new file mode 100644 index 0000000..48e9f9a Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at new file mode 100644 index 0000000..ccb64a4 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i new file mode 100644 index 0000000..c328103 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab new file mode 100644 index 0000000..0940772 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream new file mode 100644 index 0000000..8f941cd Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len new file mode 100644 index 0000000..e8086ba Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len new file mode 100644 index 0000000..48e9f9a Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at new file mode 100644 index 0000000..920524b Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i new file mode 100644 index 0000000..c328103 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab new file mode 100644 index 0000000..412460a Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream new file mode 100644 index 0000000..8c8817f Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len new file mode 100644 index 0000000..8790089 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len new file mode 100644 index 0000000..01bdaa1 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at new file mode 100644 index 0000000..5b3466f Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i new file mode 100644 index 0000000..079ec20 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab new file mode 100644 index 0000000..182654b Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream new file mode 100644 index 0000000..48361ae Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len new file mode 100644 index 0000000..f276ebe Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len new file mode 100644 index 0000000..62cf1e5 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at new file mode 100644 index 0000000..07eef3e Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i new file mode 100644 index 0000000..a0f5b95 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab new file mode 100644 index 0000000..bdf584a Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream new file mode 100644 index 0000000..807192f Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len new file mode 100644 index 0000000..1c209ae Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len new file mode 100644 index 0000000..2a17e6e Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at new file mode 100644 index 0000000..46d6744 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i new file mode 100644 index 0000000..9929949 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab new file mode 100644 index 0000000..9012181 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream new file mode 100644 index 0000000..78d7056 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len new file mode 100644 index 0000000..24d9274 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len new file mode 100644 index 0000000..6f80c14 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values new file mode 100644 index 0000000..182fb40 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at new file mode 100644 index 0000000..65a6b4b Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s new file mode 100644 index 0000000..1f1ca9e --- /dev/null +++ b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s @@ -0,0 +1 @@ +zmfhg \ No newline at end of file diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i new file mode 100644 index 0000000..595cec3 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab new file mode 100644 index 0000000..98665c9 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream new file mode 100644 index 0000000..50f0d01 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len new file mode 100644 index 0000000..0dfd164 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len new file mode 100644 index 0000000..709f734 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at new file mode 100644 index 0000000..f8c9673 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i new file mode 100644 index 0000000..0327685 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab new file mode 100644 index 0000000..e29ec98 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream new file mode 100644 index 0000000..cc52e64 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len new file mode 100644 index 0000000..df8df07 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len new file mode 100644 index 0000000..003bc0e Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at new file mode 100644 index 0000000..aa820df Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i new file mode 100644 index 0000000..444b0f3 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab new file mode 100644 index 0000000..6b8ebcc Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream new file mode 100644 index 0000000..169d5f4 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len new file mode 100644 index 0000000..05fc992 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len new file mode 100644 index 0000000..003bc0e Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at new file mode 100644 index 0000000..83b3a21 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i new file mode 100644 index 0000000..53cdc9e Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab new file mode 100644 index 0000000..67d26b1 --- /dev/null +++ b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab @@ -0,0 +1,2 @@ +76 +0 \ No newline at end of file diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab new file mode 100644 index 0000000..0f74d5c Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream new file mode 100644 index 0000000..50f0d01 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len new file mode 100644 index 0000000..0dfd164 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len new file mode 100644 index 0000000..709f734 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at new file mode 100644 index 0000000..1e5e634 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i new file mode 100644 index 0000000..0327685 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab new file mode 100644 index 0000000..4f5714b Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream new file mode 100644 index 0000000..a7c3764 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len new file mode 100644 index 0000000..066dfb4 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len new file mode 100644 index 0000000..ed45ee1 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at new file mode 100644 index 0000000..793606f Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i new file mode 100644 index 0000000..e691720 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab new file mode 100644 index 0000000..5457812 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream new file mode 100644 index 0000000..bfa2280 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len new file mode 100644 index 0000000..a13afd7 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len new file mode 100644 index 0000000..d54e764 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values new file mode 100644 index 0000000..a44fd23 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at new file mode 100644 index 0000000..7208909 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s new file mode 100644 index 0000000..c2943b2 --- /dev/null +++ b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i new file mode 100644 index 0000000..66473bd Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i differ diff --git a/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len new file mode 100644 index 0000000..131e265 Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len differ diff --git a/build/kotlin/compileKotlin/cacheable/last-build.bin b/build/kotlin/compileKotlin/cacheable/last-build.bin new file mode 100644 index 0000000..22636ad Binary files /dev/null and b/build/kotlin/compileKotlin/cacheable/last-build.bin differ diff --git a/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin b/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin new file mode 100644 index 0000000..eccf775 Binary files /dev/null and b/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin differ diff --git a/build/kotlin/compileKotlin/local-state/build-history.bin b/build/kotlin/compileKotlin/local-state/build-history.bin new file mode 100644 index 0000000..a34c679 Binary files /dev/null and b/build/kotlin/compileKotlin/local-state/build-history.bin differ diff --git a/build/resources/main/application.yml b/build/resources/main/application.yml new file mode 100644 index 0000000..b5417b9 --- /dev/null +++ b/build/resources/main/application.yml @@ -0,0 +1,22 @@ +spring: + datasource: + driver-class-name: org.h2.Driver + url: jdbc:h2:mem:testdb;NON_KEYWORDS=USER + username: sa + password: + + h2: + console: + enabled: true + path: /h2-console + jpa: + defer-datasource-initialization: true + database-platform: org.hibernate.dialect.H2Dialect + hibernate: + ddl-auto: create + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true + show_sql: true + physical-naming-strategy: com.example.estpayments.config.ImprovedNamingStrategy \ No newline at end of file diff --git a/http/http-client.env.json b/http/http-client.env.json new file mode 100644 index 0000000..bbc55fc --- /dev/null +++ b/http/http-client.env.json @@ -0,0 +1,5 @@ +{ + "default": { + "host": "http://localhost:8080" + } +} diff --git a/http/request/Account.http b/http/request/Account.http new file mode 100644 index 0000000..ebe208b --- /dev/null +++ b/http/request/Account.http @@ -0,0 +1,11 @@ +### 계좌 생성 +POST {{host}}/accounts +Content-Type: application/json + +{ + "userId": 1 +} + +### 계좌 조회 +GET {{host}}/accounts/1 +Content-Type: application/json \ No newline at end of file diff --git a/http/request/Transaction.http b/http/request/Transaction.http new file mode 100644 index 0000000..51f2988 --- /dev/null +++ b/http/request/Transaction.http @@ -0,0 +1,9 @@ +### 송금 +POST {{host}}/transactions +Content-Type: application/json + +{ + "senderAccountId": 1, + "receiverAccountId": 2, + "amount": 500 +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estdelivery/EstPaymentsApplication.kt b/src/main/kotlin/com/example/estpayments/EstPaymentsApplication.kt similarity index 88% rename from src/main/kotlin/com/example/estdelivery/EstPaymentsApplication.kt rename to src/main/kotlin/com/example/estpayments/EstPaymentsApplication.kt index 83f622a..6787639 100644 --- a/src/main/kotlin/com/example/estdelivery/EstPaymentsApplication.kt +++ b/src/main/kotlin/com/example/estpayments/EstPaymentsApplication.kt @@ -1,4 +1,4 @@ -package com.example.estdelivery +package com.example.estpayments import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication diff --git a/src/main/kotlin/com/example/estpayments/adapter/in/web/AccountController.kt b/src/main/kotlin/com/example/estpayments/adapter/in/web/AccountController.kt new file mode 100644 index 0000000..a29ebac --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/in/web/AccountController.kt @@ -0,0 +1,42 @@ +package com.example.estpayments.adapter.`in`.web + +import com.example.estpayments.adapter.`in`.web.dto.AccountCreateRequest +import com.example.estpayments.adapter.`in`.web.dto.AccountCreateResponse +import com.example.estpayments.adapter.`in`.web.dto.AccountResponse +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.port.`in`.AccountCreateUseCase +import com.example.estpayments.application.port.`in`.AccountFindUseCase +import com.example.estpayments.application.port.`in`.command.AccountFindCommand +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +@RequestMapping("/accounts") +class AccountController( + private val accountCreateUseCase: AccountCreateUseCase, + private val accountFindUseCase: AccountFindUseCase +) { + @PostMapping + fun createAccount( + @RequestBody accountCreateRequest: AccountCreateRequest + ): Result = + Result.success( + AccountCreateResponse.from( + accountCreateUseCase.create(accountCreateRequest.toCommand()) + ) + ) + + @GetMapping("/{id}") + fun getAccount( + @PathVariable id: Long + ): Result = + Result.success( + AccountResponse.from( + accountFindUseCase.get(AccountFindCommand(AccountId(id))) + ) + ) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/in/web/TransactionController.kt b/src/main/kotlin/com/example/estpayments/adapter/in/web/TransactionController.kt new file mode 100644 index 0000000..6c22255 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/in/web/TransactionController.kt @@ -0,0 +1,25 @@ +package com.example.estpayments.adapter.`in`.web + +import com.example.estpayments.adapter.`in`.web.dto.TransactionExecuteRequest +import com.example.estpayments.adapter.`in`.web.dto.TransactionExecuteResponse +import com.example.estpayments.application.port.`in`.TransactionExecuteUseCase +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +@RequestMapping("/transactions") +class TransactionController( + private val transactionExecuteUseCase: TransactionExecuteUseCase +) { + @PostMapping + fun executeTransaction( + @RequestBody transactionExecuteRequest: TransactionExecuteRequest + ): Result = + Result.success( + TransactionExecuteResponse.from( + transactionExecuteUseCase.execute(transactionExecuteRequest.toCommand()) + ) + ) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/AccountDto.kt b/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/AccountDto.kt new file mode 100644 index 0000000..76df445 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/AccountDto.kt @@ -0,0 +1,33 @@ +package com.example.estpayments.adapter.`in`.web.dto + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.domain.model.UserId +import com.example.estpayments.application.port.`in`.command.AccountCreateCommand + +data class AccountResponse( + val id: Long, + val userId: Long, + val balance: Long +) { + companion object { + fun from(account: Account): AccountResponse = + AccountResponse(id = account.id.value, userId = account.userId.value, balance = account.balance.value) + } +} + +data class AccountCreateRequest( + val userId: Long +) { + fun toCommand(): AccountCreateCommand = AccountCreateCommand(userId = UserId(userId)) +} + +data class AccountCreateResponse( + val id: Long, + val userId: Long, + val balance: Long +) { + companion object { + fun from(account: Account): AccountCreateResponse = + AccountCreateResponse(id = account.id.value, userId = account.userId.value, balance = account.balance.value) + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.kt b/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.kt new file mode 100644 index 0000000..633cb78 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/in/web/dto/TransactionExecuteRequest.kt @@ -0,0 +1,27 @@ +package com.example.estpayments.adapter.`in`.web.dto + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.domain.model.Money +import com.example.estpayments.application.port.`in`.command.TransactionExecuteCommand + +data class TransactionExecuteRequest( + val senderAccountId: Long, + val receiverAccountId: Long, + val amount: Long +) { + fun toCommand(): TransactionExecuteCommand = TransactionExecuteCommand( + senderAccountId = AccountId(senderAccountId), + receiverAccountId = AccountId(receiverAccountId), + amount = Money(amount) + ) +} + +data class TransactionExecuteResponse( + val balance: Long +) { + companion object { + fun from(account: Account): TransactionExecuteResponse = + TransactionExecuteResponse(balance = account.balance.value) + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountEntity.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountEntity.kt new file mode 100644 index 0000000..e7b328c --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountEntity.kt @@ -0,0 +1,21 @@ +package com.example.estpayments.adapter.out.persistence + +import jakarta.persistence.Entity +import jakarta.persistence.GeneratedValue +import jakarta.persistence.GenerationType +import jakarta.persistence.Id +import jakarta.persistence.Table + +@Entity +@Table(name = "account") +class AccountEntity( + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + val id: Long? = null, + val userId: Long, + var balance: Long, +) : BaseTimeEntity() { + fun updateBalance(money: Long) { + balance = money + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountMapper.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountMapper.kt new file mode 100644 index 0000000..d6ea22a --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountMapper.kt @@ -0,0 +1,17 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.domain.model.Money +import com.example.estpayments.application.domain.model.UserId +import com.example.estpayments.common.Constant.INITIAL_BALANCE + + +object AccountMapper { + fun toAccount(accountEntity: AccountEntity): Account = + Account( + id = AccountId(accountEntity.id!!), + userId = UserId(accountEntity.userId), + balance = Money(INITIAL_BALANCE) + ) +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.kt new file mode 100644 index 0000000..96e3fe1 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountPersistenceAdapter.kt @@ -0,0 +1,36 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.out.AccountCreatePort +import com.example.estpayments.application.port.out.AccountFindPort +import com.example.estpayments.application.port.out.AccountUpdatePort +import com.example.estpayments.common.Constant +import com.example.estpayments.common.annotation.PersistenceAdapter +import org.springframework.data.repository.findByIdOrNull + +@PersistenceAdapter +class AccountPersistenceAdapter( + private val accountRepository: AccountRepository +) : AccountCreatePort, AccountFindPort, AccountUpdatePort { + override fun create(userId: Long): Account = + AccountMapper.toAccount( + accountRepository.save( + AccountEntity( + userId = userId, + balance = Constant.INITIAL_BALANCE + ) + ) + ) + + override fun get(id: Long): Account = + AccountMapper.toAccount( + accountRepository.findByIdOrNull(id) + ?: throw IllegalArgumentException("not exists account.") + ) + + override fun updateBalance(account: Account) { + val accountEntity = accountRepository.findByIdOrNull(account.id.value) + ?: throw IllegalArgumentException("not exists account.") + accountEntity.updateBalance(account.balance.value) + } +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountRepository.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountRepository.kt new file mode 100644 index 0000000..20cdbbd --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/AccountRepository.kt @@ -0,0 +1,6 @@ +package com.example.estpayments.adapter.out.persistence + +import org.springframework.data.jpa.repository.JpaRepository + +interface AccountRepository : JpaRepository { +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.kt new file mode 100644 index 0000000..13382cc --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/BaseTimeEntity.kt @@ -0,0 +1,18 @@ +package com.example.estpayments.adapter.out.persistence + +import jakarta.persistence.EntityListeners +import jakarta.persistence.MappedSuperclass +import org.springframework.data.annotation.CreatedDate +import org.springframework.data.annotation.LastModifiedDate +import org.springframework.data.jpa.domain.support.AuditingEntityListener +import java.time.LocalDateTime + +@MappedSuperclass +@EntityListeners(AuditingEntityListener::class) +abstract class BaseTimeEntity { + @CreatedDate + var createdAt: LocalDateTime? = null + + @LastModifiedDate + var updatedAt: LocalDateTime? = null +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionEntity.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionEntity.kt new file mode 100644 index 0000000..084769c --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionEntity.kt @@ -0,0 +1,33 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.TransactionStatus +import jakarta.persistence.Entity +import jakarta.persistence.EnumType +import jakarta.persistence.Enumerated +import jakarta.persistence.GeneratedValue +import jakarta.persistence.GenerationType +import jakarta.persistence.Id +import jakarta.persistence.Table +import java.time.LocalDateTime + +@Entity +@Table(name = "transaction") +class TransactionEntity( + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + val id: Long? = null, + val senderAccountId: Long, + val receiverAccountId: Long, + val amount: Long, + val transactionDate: LocalDateTime, + @Enumerated(EnumType.STRING) + var status: TransactionStatus +) : BaseTimeEntity() { + fun completed() { + status = TransactionStatus.COMPLETED + } + + fun failed() { + status = TransactionStatus.FAILED + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionMapper.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionMapper.kt new file mode 100644 index 0000000..f7a787f --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionMapper.kt @@ -0,0 +1,28 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.domain.model.Money +import com.example.estpayments.application.domain.model.Transaction +import com.example.estpayments.application.domain.model.TransactionId +import java.time.LocalDateTime + + +object TransactionMapper { + fun toTransaction(transactionEntity: TransactionEntity): Transaction = + Transaction( + id = TransactionId(transactionEntity.id!!), + senderAccountId = AccountId(transactionEntity.senderAccountId), + receiverAccountId = AccountId(transactionEntity.receiverAccountId), + amount = Money(transactionEntity.amount), + transactionDate = transactionEntity.transactionDate, + status = transactionEntity.status + ) + + fun toTransactionEntity(transaction: Transaction) = TransactionEntity( + senderAccountId = transaction.senderAccountId.value, + receiverAccountId = transaction.receiverAccountId.value, + amount = transaction.amount.value, + status = transaction.status!!, + transactionDate = LocalDateTime.now() + ) +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.kt new file mode 100644 index 0000000..2586f02 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionPersistenceAdapter.kt @@ -0,0 +1,54 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.Transaction +import com.example.estpayments.application.domain.model.TransactionStatus +import com.example.estpayments.application.port.out.TransactionCreatePort +import com.example.estpayments.application.port.out.TransactionFindPort +import com.example.estpayments.application.port.out.TransactionUpdatePort +import com.example.estpayments.common.annotation.PersistenceAdapter +import org.springframework.data.repository.findByIdOrNull +import org.springframework.transaction.annotation.Transactional + +@PersistenceAdapter +class TransactionPersistenceAdapter( + private val transactionRepository: TransactionRepository +) : TransactionCreatePort, TransactionFindPort, TransactionUpdatePort { + @Transactional + override fun create( + transaction: Transaction + ): Transaction = + TransactionMapper.toTransaction( + transactionRepository.save(TransactionMapper.toTransactionEntity(transaction)) + ) + + @Transactional(readOnly = true) + override fun get( + id: Long + ): Transaction = + TransactionMapper.toTransaction( + transactionRepository.findByIdOrNull(id) + ?: throw IllegalArgumentException("not exists transaction.") + ) + + @Transactional(readOnly = true) + override fun isPending(senderAccountId: Long, receiverAccountId: Long): Boolean = + transactionRepository.existsBySenderAccountIdAndReceiverAccountIdAndStatus( + senderAccountId, + receiverAccountId, + TransactionStatus.PENDING + ) + + @Transactional + override fun completed(id: Long) { + val transactionEntity = transactionRepository.findByIdOrNull(id) + ?: throw IllegalArgumentException("not exists transaction.") + transactionEntity.completed() + } + + @Transactional + override fun failed(id: Long) { + val transactionEntity = transactionRepository.findByIdOrNull(id) + ?: throw IllegalArgumentException("not exists transaction.") + transactionEntity.failed() + } +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionRepository.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionRepository.kt new file mode 100644 index 0000000..67e382f --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/TransactionRepository.kt @@ -0,0 +1,12 @@ +package com.example.estpayments.adapter.out.persistence + +import com.example.estpayments.application.domain.model.TransactionStatus +import org.springframework.data.jpa.repository.JpaRepository + +interface TransactionRepository : JpaRepository { + fun existsBySenderAccountIdAndReceiverAccountIdAndStatus( + senderAccountId: Long, + receiverAccountId: Long, + status: TransactionStatus + ): Boolean +} diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserEntity.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserEntity.kt new file mode 100644 index 0000000..f847f82 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserEntity.kt @@ -0,0 +1,16 @@ +package com.example.estpayments.adapter.out.persistence + +import jakarta.persistence.Entity +import jakarta.persistence.GeneratedValue +import jakarta.persistence.GenerationType +import jakarta.persistence.Id +import jakarta.persistence.Table + +@Entity +@Table(name = "user") +class UserEntity( + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + val id: Long? = null, + val name: String +) : BaseTimeEntity() \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserRepository.kt b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserRepository.kt new file mode 100644 index 0000000..4545812 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/adapter/out/persistence/UserRepository.kt @@ -0,0 +1,6 @@ +package com.example.estpayments.adapter.out.persistence + +import org.springframework.data.jpa.repository.JpaRepository + +interface UserRepository : JpaRepository { +} diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/Account.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/Account.kt new file mode 100644 index 0000000..8009277 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/Account.kt @@ -0,0 +1,17 @@ +package com.example.estpayments.application.domain.model + +data class Account( + val id: AccountId, + val userId: UserId, + var balance: Money, +) { + fun withdrawable(money: Money): Boolean = balance.isPositive() && balance.isGreaterThan(money) + + fun withdraw(money: Money) { + balance = balance.minus(money) + } + + fun deposit(money: Money) { + balance = balance.plus(money) + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/AccountId.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/AccountId.kt new file mode 100644 index 0000000..148f6cf --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/AccountId.kt @@ -0,0 +1,4 @@ +package com.example.estpayments.application.domain.model + +@JvmInline +value class AccountId(val value: Long) \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/Money.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/Money.kt new file mode 100644 index 0000000..805a7eb --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/Money.kt @@ -0,0 +1,14 @@ +package com.example.estpayments.application.domain.model + +import com.example.estpayments.common.Constant.ZERO_BALANCE + +@JvmInline +value class Money(val value: Long) { + fun isPositive(): Boolean = value > ZERO_BALANCE + + fun isGreaterThan(money: Money): Boolean = value > money.value + + fun minus(money: Money): Money = Money(value.minus(money.value)) + + fun plus(money: Money): Money = Money(value.plus(money.value)) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/Transaction.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/Transaction.kt new file mode 100644 index 0000000..4744f19 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/Transaction.kt @@ -0,0 +1,20 @@ +package com.example.estpayments.application.domain.model + +import java.time.LocalDateTime + +data class Transaction( + val id: TransactionId? = null, + val senderAccountId: AccountId, + val receiverAccountId: AccountId, + val amount: Money, + val transactionDate: LocalDateTime? = LocalDateTime.now(), + var status: TransactionStatus? = TransactionStatus.PENDING +) { + fun initial() { + status = TransactionStatus.PENDING + } +} + +enum class TransactionStatus { + PENDING, COMPLETED, FAILED +} diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/TransactionId.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/TransactionId.kt new file mode 100644 index 0000000..1141893 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/TransactionId.kt @@ -0,0 +1,4 @@ +package com.example.estpayments.application.domain.model + +@JvmInline +value class TransactionId(val value: Long) \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/User.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/User.kt new file mode 100644 index 0000000..ed78380 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/User.kt @@ -0,0 +1,6 @@ +package com.example.estpayments.application.domain.model + +data class User( + val id: UserId, + val name: String +) \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/model/UserId.kt b/src/main/kotlin/com/example/estpayments/application/domain/model/UserId.kt new file mode 100644 index 0000000..e3c5a48 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/model/UserId.kt @@ -0,0 +1,4 @@ +package com.example.estpayments.application.domain.model + +@JvmInline +value class UserId(val value: Long) \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/service/AccountCreateService.kt b/src/main/kotlin/com/example/estpayments/application/domain/service/AccountCreateService.kt new file mode 100644 index 0000000..c2b7409 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/service/AccountCreateService.kt @@ -0,0 +1,16 @@ +package com.example.estpayments.application.domain.service + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.AccountCreateUseCase +import com.example.estpayments.application.port.`in`.command.AccountCreateCommand +import com.example.estpayments.application.port.out.AccountCreatePort +import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional + +@Service +class AccountCreateService( + private val accountCreatePort: AccountCreatePort +) : AccountCreateUseCase { + @Transactional + override fun create(command: AccountCreateCommand): Account = accountCreatePort.create(command.userId.value) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/service/AccountFindService.kt b/src/main/kotlin/com/example/estpayments/application/domain/service/AccountFindService.kt new file mode 100644 index 0000000..56d9780 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/service/AccountFindService.kt @@ -0,0 +1,16 @@ +package com.example.estpayments.application.domain.service + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.AccountFindUseCase +import com.example.estpayments.application.port.`in`.command.AccountFindCommand +import com.example.estpayments.application.port.out.AccountFindPort +import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional + +@Service +class AccountFindService( + private val accountFindPort: AccountFindPort +) : AccountFindUseCase { + @Transactional(readOnly = true) + override fun get(command: AccountFindCommand): Account = accountFindPort.get(command.id.value) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/domain/service/TransactionExecuteService.kt b/src/main/kotlin/com/example/estpayments/application/domain/service/TransactionExecuteService.kt new file mode 100644 index 0000000..b1b7114 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/domain/service/TransactionExecuteService.kt @@ -0,0 +1,57 @@ +package com.example.estpayments.application.domain.service + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.TransactionExecuteUseCase +import com.example.estpayments.application.port.`in`.command.TransactionExecuteCommand +import com.example.estpayments.application.port.out.AccountFindPort +import com.example.estpayments.application.port.out.AccountUpdatePort +import com.example.estpayments.application.port.out.TransactionCreatePort +import com.example.estpayments.application.port.out.TransactionFindPort +import com.example.estpayments.application.port.out.TransactionUpdatePort +import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional + +@Service +class TransactionExecuteService( + private val accountFindPort: AccountFindPort, + private val accountUpdatePort: AccountUpdatePort, + private val transactionCreatePort: TransactionCreatePort, + private val transactionFindPort: TransactionFindPort, + private val transactionUpdatePort: TransactionUpdatePort, +) : TransactionExecuteUseCase { + @Transactional + override fun execute(command: TransactionExecuteCommand): Account { + // 계좌 조회 + val senderAccount = accountFindPort.get(command.senderAccountId.value) + val receiverAccount = accountFindPort.get(command.receiverAccountId.value) + + // 송금 계좌 잔액 확인 + if (!senderAccount.withdrawable(command.amount)) { + throw IllegalArgumentException("insufficient balance.") + } + + // 중복 송금 확인 + if (transactionFindPort.isPending(command.senderAccountId.value, command.receiverAccountId.value)) { + throw IllegalArgumentException("duplicated transaction.") + } + + // 송금 + val transaction = command.toTransactionDomain() + transaction.initial() + val transactionId = transactionCreatePort.create(transaction).id!! + + try { + senderAccount.withdraw(command.amount) + receiverAccount.deposit(command.amount) + accountUpdatePort.updateBalance(senderAccount) + accountUpdatePort.updateBalance(receiverAccount) + + transactionUpdatePort.completed(transactionId.value) + } catch (e: Exception) { + transactionUpdatePort.failed(transactionId.value) + throw e + } + + return senderAccount + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/in/AccountCreateUseCase.kt b/src/main/kotlin/com/example/estpayments/application/port/in/AccountCreateUseCase.kt new file mode 100644 index 0000000..804a71a --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/in/AccountCreateUseCase.kt @@ -0,0 +1,8 @@ +package com.example.estpayments.application.port.`in` + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.command.AccountCreateCommand + +interface AccountCreateUseCase { + fun create(command: AccountCreateCommand): Account +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/in/AccountFindUseCase.kt b/src/main/kotlin/com/example/estpayments/application/port/in/AccountFindUseCase.kt new file mode 100644 index 0000000..de3d263 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/in/AccountFindUseCase.kt @@ -0,0 +1,9 @@ +package com.example.estpayments.application.port.`in` + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.command.AccountCreateCommand +import com.example.estpayments.application.port.`in`.command.AccountFindCommand + +interface AccountFindUseCase { + fun get(command: AccountFindCommand): Account +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/in/TransactionExecuteUseCase.kt b/src/main/kotlin/com/example/estpayments/application/port/in/TransactionExecuteUseCase.kt new file mode 100644 index 0000000..dcb88bb --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/in/TransactionExecuteUseCase.kt @@ -0,0 +1,8 @@ +package com.example.estpayments.application.port.`in` + +import com.example.estpayments.application.domain.model.Account +import com.example.estpayments.application.port.`in`.command.TransactionExecuteCommand + +interface TransactionExecuteUseCase { + fun execute(command: TransactionExecuteCommand): Account +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/in/command/AccountCommand.kt b/src/main/kotlin/com/example/estpayments/application/port/in/command/AccountCommand.kt new file mode 100644 index 0000000..f25238e --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/in/command/AccountCommand.kt @@ -0,0 +1,8 @@ +package com.example.estpayments.application.port.`in`.command + +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.domain.model.UserId + +data class AccountCreateCommand(val userId: UserId) + +data class AccountFindCommand(val id: AccountId) \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/in/command/TransactionCommand.kt b/src/main/kotlin/com/example/estpayments/application/port/in/command/TransactionCommand.kt new file mode 100644 index 0000000..8220982 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/in/command/TransactionCommand.kt @@ -0,0 +1,18 @@ +package com.example.estpayments.application.port.`in`.command + +import com.example.estpayments.application.domain.model.AccountId +import com.example.estpayments.application.domain.model.Money +import com.example.estpayments.application.domain.model.Transaction +import com.example.estpayments.application.domain.model.TransactionStatus + +data class TransactionExecuteCommand( + val senderAccountId: AccountId, + val receiverAccountId: AccountId, + val amount: Money, +) { + fun toTransactionDomain(): Transaction = Transaction( + senderAccountId = senderAccountId, + receiverAccountId = receiverAccountId, + amount = amount + ) +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/AccountCreatePort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/AccountCreatePort.kt new file mode 100644 index 0000000..b7e4196 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/AccountCreatePort.kt @@ -0,0 +1,7 @@ +package com.example.estpayments.application.port.out + +import com.example.estpayments.application.domain.model.Account + +interface AccountCreatePort { + fun create(userId: Long): Account +} diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/AccountFindPort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/AccountFindPort.kt new file mode 100644 index 0000000..7e9f5c8 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/AccountFindPort.kt @@ -0,0 +1,7 @@ +package com.example.estpayments.application.port.out + +import com.example.estpayments.application.domain.model.Account + +interface AccountFindPort { + fun get(id: Long): Account +} diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/AccountUpdatePort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/AccountUpdatePort.kt new file mode 100644 index 0000000..05898f4 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/AccountUpdatePort.kt @@ -0,0 +1,7 @@ +package com.example.estpayments.application.port.out + +import com.example.estpayments.application.domain.model.Account + +interface AccountUpdatePort { + fun updateBalance(account: Account) +} diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/TransactionCreatePort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionCreatePort.kt new file mode 100644 index 0000000..a573e5c --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionCreatePort.kt @@ -0,0 +1,7 @@ +package com.example.estpayments.application.port.out + +import com.example.estpayments.application.domain.model.Transaction + +interface TransactionCreatePort { + fun create(transaction: Transaction): Transaction +} diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/TransactionFindPort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionFindPort.kt new file mode 100644 index 0000000..b69a813 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionFindPort.kt @@ -0,0 +1,11 @@ +package com.example.estpayments.application.port.out + +import com.example.estpayments.application.domain.model.Transaction + +interface TransactionFindPort { + fun get(id: Long): Transaction + fun isPending( + senderAccountId: Long, + receiverAccountId: Long + ): Boolean +} diff --git a/src/main/kotlin/com/example/estpayments/application/port/out/TransactionUpdatePort.kt b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionUpdatePort.kt new file mode 100644 index 0000000..365c8d6 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/application/port/out/TransactionUpdatePort.kt @@ -0,0 +1,7 @@ +package com.example.estpayments.application.port.out + +interface TransactionUpdatePort { + fun completed(id: Long) + + fun failed(id: Long) +} diff --git a/src/main/kotlin/com/example/estpayments/common/Constant.kt b/src/main/kotlin/com/example/estpayments/common/Constant.kt new file mode 100644 index 0000000..a69e607 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/common/Constant.kt @@ -0,0 +1,6 @@ +package com.example.estpayments.common + +object Constant { + const val INITIAL_BALANCE = 1000L + const val ZERO_BALANCE = 0L +} \ No newline at end of file diff --git a/src/main/kotlin/com/example/estpayments/common/annotation/PersistenceAdapter.kt b/src/main/kotlin/com/example/estpayments/common/annotation/PersistenceAdapter.kt new file mode 100644 index 0000000..676c8a1 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/common/annotation/PersistenceAdapter.kt @@ -0,0 +1,8 @@ +package com.example.estpayments.common.annotation + +import org.springframework.stereotype.Component + +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +@Component +annotation class PersistenceAdapter diff --git a/src/main/kotlin/com/example/estpayments/config/ImprovedNamingStrategy.kt b/src/main/kotlin/com/example/estpayments/config/ImprovedNamingStrategy.kt new file mode 100644 index 0000000..48395a6 --- /dev/null +++ b/src/main/kotlin/com/example/estpayments/config/ImprovedNamingStrategy.kt @@ -0,0 +1,57 @@ +package com.example.estpayments.config + +import org.hibernate.boot.model.naming.Identifier +import org.hibernate.boot.model.naming.PhysicalNamingStrategy +import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment +import org.springframework.stereotype.Component +import org.springframework.util.StringUtils +import java.util.Locale + +@Component +class ImprovedNamingStrategy : PhysicalNamingStrategy { + override fun toPhysicalCatalogName( + name: Identifier?, + jdbcEnvironment: JdbcEnvironment?, + ): Identifier? { + return convert(name) + } + + override fun toPhysicalSchemaName( + name: Identifier?, + jdbcEnvironment: JdbcEnvironment?, + ): Identifier? { + return convert(name) + } + + override fun toPhysicalTableName( + name: Identifier?, + jdbcEnvironment: JdbcEnvironment?, + ): Identifier? { + return convert(name) + } + + override fun toPhysicalSequenceName( + name: Identifier?, + jdbcEnvironment: JdbcEnvironment?, + ): Identifier? { + return convert(name) + } + + override fun toPhysicalColumnName( + name: Identifier?, + jdbcEnvironment: JdbcEnvironment?, + ): Identifier? { + return convert(name) + } + + private fun convert(identifier: Identifier?): Identifier? { + if (identifier == null || !StringUtils.hasText(identifier.text)) { + return identifier + } + + val regex = "([a-z])([A-Z])" + val replacement = "$1_$2" + val newName = identifier.text.replace(regex.toRegex(), replacement).lowercase(Locale.getDefault()) + return Identifier.toIdentifier(newName) + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 8b13789..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..b5417b9 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,22 @@ +spring: + datasource: + driver-class-name: org.h2.Driver + url: jdbc:h2:mem:testdb;NON_KEYWORDS=USER + username: sa + password: + + h2: + console: + enabled: true + path: /h2-console + jpa: + defer-datasource-initialization: true + database-platform: org.hibernate.dialect.H2Dialect + hibernate: + ddl-auto: create + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true + show_sql: true + physical-naming-strategy: com.example.estpayments.config.ImprovedNamingStrategy \ No newline at end of file diff --git a/src/test/kotlin/com/example/estdelivery/EstPaymentsApplicationTests.kt b/src/test/kotlin/com/example/estpayments/EstPaymentsApplicationTests.kt similarity index 85% rename from src/test/kotlin/com/example/estdelivery/EstPaymentsApplicationTests.kt rename to src/test/kotlin/com/example/estpayments/EstPaymentsApplicationTests.kt index 8627233..bded762 100644 --- a/src/test/kotlin/com/example/estdelivery/EstPaymentsApplicationTests.kt +++ b/src/test/kotlin/com/example/estpayments/EstPaymentsApplicationTests.kt @@ -1,4 +1,4 @@ -package com.example.estdelivery +package com.example.estpayments import org.junit.jupiter.api.Test import org.springframework.boot.test.context.SpringBootTest