Skip to content

Commit

Permalink
Merge pull request #993 from traPtitech/develop
Browse files Browse the repository at this point in the history
developブランチをmainに取り込む
  • Loading branch information
ikura-hamu authored Sep 23, 2024
2 parents 32e624c + 8ea56c3 commit ee77dc7
Show file tree
Hide file tree
Showing 207 changed files with 8,204 additions and 34,268 deletions.
23 changes: 18 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
run:
skip-dirs:
issues:
exclude-dirs:
- openapi
- mock

linters:
enable:
- govet
- errcheck
- staticcheck
- unused
- gosimple
- structcheck
- varcheck
- ineffassign
- deadcode
- typecheck
- revive
- gofmt

linters-settings:
staticcheck:
checks:
# ここからデフォルト https://staticcheck.dev/docs/configuration/options/#checks
- "all"
- "-ST1000"
- "-ST1003"
- "-ST1016"
- "-ST1020"
- "-ST1021"
- "-ST1022"
# ここまでデフォルト
- "-SA3000" # TestMainでos.Exitを呼ぶことのチェック。go1.15以降ではTestMainが勝手にos.Exitするので無効化
18 changes: 18 additions & 0 deletions .tbls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ comments:
columnComments:
id: ゲームUUID
name: ゲーム名
visibility_type_id: ゲームの公開範囲のID
description: ゲームの説明
created_at: 作成日時
deleted_at: 削除日時
Expand Down Expand Up @@ -198,3 +199,20 @@ comments:
game_id: ゲームUUID
video_type_id: 動画の種類のUUID
created_at: 作成日時
- table: game_visibility_types
tableComment: ゲームの公開範囲のテーブル
columnComments:
id: ゲームの公開範囲のID
name: ゲームの公開範囲の名前
created_at: 作成日時
- table: game_genres
tableComment: ゲームのジャンルのテーブル
columnComments:
id: ゲームのジャンルのID
name: ゲームのジャンルの名前
created_at: 作成日時
- table: game_genre_relations
tableComment: ゲームとジャンルの関係テーブル
columnComments:
game_id: ゲームUUID
genre_id: ゲームのジャンルのID
7 changes: 4 additions & 3 deletions docs/db_schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
| [admins](admins.md) | 1 | | BASE TABLE |
| [editions](editions.md) | 5 | エディションテーブル(v2) | BASE TABLE |
| [edition_game_version_relations](edition_game_version_relations.md) | 2 | エディションとゲームバージョンの関係テーブル(v2) | BASE TABLE |
| [games](games.md) | 5 | ゲームテーブル | BASE TABLE |
| [games](games.md) | 6 | ゲームテーブル | BASE TABLE |
| [game_files](game_files.md) | 6 | ゲームファイルテーブル(v1) | BASE TABLE |
| [game_file_types](game_file_types.md) | 3 | ゲームファイルの種類のテーブル | BASE TABLE |
| [game_genres](game_genres.md) | 3 | | BASE TABLE |
| [game_genre_relations](game_genre_relations.md) | 2 | | BASE TABLE |
| [game_genres](game_genres.md) | 3 | ゲームのジャンルのテーブル | BASE TABLE |
| [game_genre_relations](game_genre_relations.md) | 2 | ゲームとジャンルの関係テーブル | BASE TABLE |
| [game_images](game_images.md) | 4 | ゲーム画像テーブル(v1) | BASE TABLE |
| [game_image_types](game_image_types.md) | 3 | ゲーム画像の種類のテーブル | BASE TABLE |
| [game_management_roles](game_management_roles.md) | 3 | ゲーム管理者の権限のテーブル | BASE TABLE |
Expand All @@ -22,6 +22,7 @@
| [game_version_game_file_relations](game_version_game_file_relations.md) | 2 | ゲームバージョンとゲームファイルの関係テーブル(v2) | BASE TABLE |
| [game_videos](game_videos.md) | 4 | ゲーム動画テーブル(v1) | BASE TABLE |
| [game_video_types](game_video_types.md) | 3 | ゲーム動画の種類のテーブル | BASE TABLE |
| [game_visibility_types](game_visibility_types.md) | 3 | ゲームの公開範囲のテーブル | BASE TABLE |
| [launcher_sessions](launcher_sessions.md) | 6 | ランチャーセッションテーブル(v1) | BASE TABLE |
| [launcher_users](launcher_users.md) | 5 | ランチャーユーザーテーブル(v1) | BASE TABLE |
| [launcher_versions](launcher_versions.md) | 5 | ランチャーバージョンテーブル(v1) | BASE TABLE |
Expand Down
18 changes: 14 additions & 4 deletions docs/db_schema/game_genre_relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Description

ゲームとジャンルの関係テーブル

<details>
<summary><strong>Table Definition</strong></summary>

Expand All @@ -10,8 +12,12 @@ CREATE TABLE `game_genre_relations` (
`genre_id` varchar(36) NOT NULL,
`game_id` varchar(36) NOT NULL,
PRIMARY KEY (`genre_id`,`game_id`),
KEY `fk_game_genre_relations_game_table2_v5` (`game_id`),
KEY `fk_game_genre_relations_game_table2_v12` (`game_id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v10` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v11` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v12` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v11` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v12` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v5` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
```
Expand All @@ -22,22 +28,26 @@ CREATE TABLE `game_genre_relations` (

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| genre_id | varchar(36) | | false | | [game_genres](game_genres.md) | |
| game_id | varchar(36) | | false | | [games](games.md) | |
| genre_id | varchar(36) | | false | | [game_genres](game_genres.md) | ゲームのジャンルのID |
| game_id | varchar(36) | | false | | [games](games.md) | ゲームUUID |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| fk_game_genre_relations_game_genre_table_v10 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_genre_table_v11 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_genre_table_v12 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_table2_v11 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| fk_game_genre_relations_game_table2_v12 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| fk_game_genre_relations_game_table2_v5 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (genre_id, game_id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| fk_game_genre_relations_game_table2_v5 | KEY fk_game_genre_relations_game_table2_v5 (game_id) USING BTREE |
| fk_game_genre_relations_game_table2_v12 | KEY fk_game_genre_relations_game_table2_v12 (game_id) USING BTREE |
| PRIMARY | PRIMARY KEY (genre_id, game_id) USING BTREE |

## Relations
Expand Down
Loading

0 comments on commit ee77dc7

Please sign in to comment.