Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
change types
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Nov 3, 2023
1 parent 293a716 commit a5c8865
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
43 changes: 18 additions & 25 deletions back/domain/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,47 @@ package domain

import "time"

type Transaction struct {
ID string `db:"id"`
MoneyPoolID string `db:"money_pool_id"`
type MoneyTransaction struct {
ID int64 `db:"id"`
MoneyPoolID int64 `db:"money_pool_id"`
TransactionDate time.Time `db:"transaction_date"`
Title string `db:"title"`
Amount float64 `db:"amount"` //金額
Labels []string `db:"labels"`
IsWorldPublic bool `db:"is_world_public"`
ShareUserIDs []string `db:"share_user_ids"`
Expectation bool `db:"expectation"`
StoreID string `db:"store_id"`
ItemIDs []string `db:"item_ids"`
Description string `db:"description"`
IsWorldPublic bool `db:"is_world_public"`
IsExpectation bool `db:"is_expectation"`
StoreID int64 `db:"store_id"`
}

type User struct {
ID string `db:"id"`
MoneyPoolIDs []string `db:"money_pool_ids"`
ID string `db:"id"`
}

type Store struct {
ID int64 `db:"id"`
Name string `db:"name"`
UserID string `db:"user_id"`
UserID int64 `db:"user_id"`
}

type MoneyPool struct {
ID string `db:"id"`
Name string `db:"name"`
Color string `db:"color"`
IsWorldPublic bool `db:"is_world_public"`
ShareUserIDs []string `db:"share_user_ids"`
ID int64 `db:"id"`
Name string `db:"name"`
Description string `db:"description"`
Color string `db:"color"`
IsWorldPublic bool `db:"is_world_public"`
OwnerID int64 `db:"owner_id"`
}

type Item struct {
ID string `db:"id"`
ID int64 `db:"id"`
Name string `db:"name"`
PricePerUnit float64 `db:"price_per_unit"`
UserID string `db:"user_id"`
}

type GetTransactionHints struct {
PartitioningKeys []string // YYYY-MM
UserID int64 `db:"user_id"`
}

type MoneyProvider struct {
ID string `db:"id"`
ID int64 `db:"id"`
Name string `db:"name"`
UserID string `db:"user_id"`
UserID int64 `db:"user_id"`
Balance float64 `db:"balance"`
}
1 change: 1 addition & 0 deletions back/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ erDiagram
BIGSERIAL id "MoneyPoolID"
text name "MoneyPoolの名前"
text description "MoneyPoolの説明"
varchar(6) color "MoneyPoolの色"
boolean is_world_public "MoneyPoolが公開されているかどうか"
BIGSERIAL owner_id "MoneyPoolのオーナーのID"
}
Expand Down

0 comments on commit a5c8865

Please sign in to comment.