-
Notifications
You must be signed in to change notification settings - Fork 2
finansu v2のテーブル作成 #895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
finansu v2のテーブル作成 #895
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9bd79ee
[feat] 購入報告周りのdomain追加
hikahana 0b57420
[feat] 物品管理のdomain追加
hikahana af2fc1a
[feat] 購入報告周りのsql作成
hikahana 8e0a627
[feat] 物品管理周りのsql作成
hikahana 9af793f
[fix] タイポ修正とforeign key導入
hikahana d83204b
[fix] foreign key導入
hikahana 4435518
[fix] rename sql file
hikahana f8adb5e
[fix] missing comma
hikahana 7cf891f
[fix] Apply UNSIGNED to the foreign key column
hikahana 7a78918
[fix] Drop the Not Null from the memo column
hikahana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type BuyReport struct { | ||
| ID int `json:"id"` | ||
| FestivalItemID int `json:"festivalItemId"` | ||
| Amount int `json:"amount"` | ||
| Memo string `json:"memo"` | ||
| PaidBy string `json:"paidBy"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type BuyStatus struct { | ||
| ID int `json:"id"` | ||
| BuyReportID int `json:"buyReportId"` | ||
| IsPacked bool `json:"isPacked"` | ||
| IsSettled bool `json:"isSettled"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type Division struct { | ||
| ID int `json:"id"` | ||
| Name string `json:"name"` | ||
| FinancialRecordId int `json:"financialRecordId"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type FestivalItem struct { | ||
| ID int `json:"id"` | ||
| Name string `json:"name"` | ||
| Memo string `json:"memo"` | ||
| DivisionID int `json:"divisionId"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type FinancialRecord struct { | ||
| ID int `json:"id"` | ||
| Name string `json:"name"` | ||
| YearID int `json:"yearId"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type ItemBudget struct { | ||
| ID int `json:"id"` | ||
| Amount int `json:"amount"` | ||
| FestivalItemID int `json:"festivalItemId"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type PaymentReceipt struct { | ||
| ID int `json:"id"` | ||
| BuyReportID int `json:"buyReportId"` | ||
| BucketName string `json:"bucketName"` | ||
| FileName string `json:"fileName"` | ||
| FileType string `json:"fileType"` | ||
| Remark string `json:"remark"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package domain | ||
|
|
||
| import ( | ||
| "time" | ||
| ) | ||
|
|
||
| type UserGroup struct { | ||
| ID int `json:"id"` | ||
| UserID int `json:"userId"` | ||
| GroupID int `json:"groupId"` | ||
| CreatedAt time.Time `json:"createdAt"` | ||
| UpdatedAt time.Time `json:"updatedAt"` | ||
| } |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE financial_records ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| name VARCHAR(255) NOT NULL, | ||
| year_id INT(10) UNSIGNED NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY year_id_foreign_key (year_id) REFERENCES years (id) | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE divisions ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| name VARCHAR(255) NOT NULL, | ||
| financial_record_id INT(10) UNSIGNED NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY financial_record_id_foreign_key (financial_record_id) REFERENCES financial_records (id) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE festival_items ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| name VARCHAR(255) NOT NULL, | ||
| memo VARCHAR(255), | ||
| division_id INT(10) UNSIGNED NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY division_id_foreign_key (division_id) REFERENCES divisions (id) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE item_budgets ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| amount INT(10) NOT NULL, | ||
| festival_item_id INT(10) UNSIGNED NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY festival_item_id_foreign_key (festival_item_id) REFERENCES festival_items (id) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE user_groups ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| user_id INT(10) UNSIGNED NOT NULL, | ||
| group_id INT(10) UNSIGNED NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY user_id_foreign_key (user_id) REFERENCES users (id), | ||
| FOREIGN KEY group_id_foreign_key (group_id) REFERENCES divisions (id) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE buy_reports ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| festival_item_id INT(10) UNSIGNED NOT NULL, | ||
| amount INT(10) NOT NULL, | ||
| memo VARCHAR(255) NOT NULL, | ||
| paid_by VARCHAR(255) NOT NULL, | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY festival_item_id_foreign_key (festival_item_id) REFERENCES festival_items (id) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE payment_receipts ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| buy_report_id INT(10) UNSIGNED NOT NULL, | ||
| bucket_name VARCHAR(255) NOT NULL, | ||
| file_name VARCHAR(255) NOT NULL, | ||
| file_type VARCHAR(255) NOT NULL, | ||
Kubosaka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| remark VARCHAR(255), | ||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES buy_reports (id) | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| USE finansu_db; | ||
|
|
||
| CREATE TABLE buy_statuses ( | ||
| id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| buy_report_id INT(10) UNSIGNED NOT NULL, | ||
| is_packed BOOLEAN NOT NULL DEFAULT FALSE, | ||
| is_settled BOOLEAN NOT NULL DEFAULT FALSE, | ||
Kubosaka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| PRIMARY KEY (id), | ||
| FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES buy_reports (id) | ||
| ); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.