Skip to content

Commit

Permalink
build:Apiセットアップ
Browse files Browse the repository at this point in the history
Add initial schema setup for H2 database

This commit adds the initial tables and constraints required for various entities in the H2 database. Entities include departments, employees, products, clients, orders, and more, complete with relevant primary keys, constraints, and comments on specific columns.
  • Loading branch information
k2works committed Oct 3, 2024
1 parent 77b9759 commit eb33213
Show file tree
Hide file tree
Showing 3 changed files with 765 additions and 3 deletions.
2 changes: 2 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ out/

### VS Code ###
.vscode/

**/src/main/java/**/autogen
6 changes: 3 additions & 3 deletions api/src/main/resources/autogen/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

<!-- SELECT 結果等を格納するドメインモデルを生成する設定 -->
<!-- targetProjectには、プロジェクトフォルダも含めることに注意 -->
<javaModelGenerator targetPackage="com.example.sms.model" targetProject="sample-project/src/main/java">
<javaModelGenerator targetPackage="com.example.sms.infrastructure.autogen" targetProject="src/main/java">
<property name="trimStrings" value="true" />
</javaModelGenerator>

<!-- SQL 設定が記述された XML を生成する設定 -->
<sqlMapGenerator targetPackage="com.example.repository" targetProject="sample-project/src/main/resources">
<sqlMapGenerator targetPackage="com.example.sms.infrastructure.autogen" targetProject="src/main/java">
</sqlMapGenerator>
<!-- マッパークラスを生成する設定 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.example.repository" targetProject="sample-project/src/main/java">
<javaClientGenerator type="XMLMAPPER" targetPackage="com.example.sms.infrastructure.autogen" targetProject="src/main/java">
</javaClientGenerator>

<!-- コードを生成するテーブルを指定 -->
Expand Down
Loading

0 comments on commit eb33213

Please sign in to comment.